pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/cross/arm-none-eabi-gcc
Module Name: pkgsrc
Committed By: brook
Date: Sun Dec 15 19:31:06 UTC 2024
Modified Files:
pkgsrc/cross/arm-none-eabi-gcc: distinfo
pkgsrc/cross/arm-none-eabi-gcc/patches: patch-gcc_system.h
Log Message:
cross/arm-none-eabi-gcc: fix build with libc++
Building gcc against libc++, e.g., with clang, poisons the ctype
macros due to including safe-ctype.h before including C++ standard
headers such as <list>, <map>, etc. The fix is to include the
standard headers first.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/cross/arm-none-eabi-gcc/distinfo
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/cross/arm-none-eabi-gcc/patches/patch-gcc_system.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/cross/arm-none-eabi-gcc/distinfo
diff -u pkgsrc/cross/arm-none-eabi-gcc/distinfo:1.14 pkgsrc/cross/arm-none-eabi-gcc/distinfo:1.15
--- pkgsrc/cross/arm-none-eabi-gcc/distinfo:1.14 Sat Jun 8 17:22:28 2024
+++ pkgsrc/cross/arm-none-eabi-gcc/distinfo Sun Dec 15 19:31:05 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2024/06/08 17:22:28 cheusov Exp $
+$NetBSD: distinfo,v 1.15 2024/12/15 19:31:05 brook Exp $
BLAKE2s (gcc-8.3.0.tar.xz) = 395b2851da05d2ee21dfe3ec95e33482b63aeea7d37db423ffb7ebefd6547499
SHA512 (gcc-8.3.0.tar.xz) = 1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802
@@ -9,7 +9,7 @@ Size (newlib-3.1.0.tar.gz) = 17958952 by
SHA1 (patch-gcc_config_arm_arm.h) = 6d8cc2474cf9e902c766281315b75d6aadc42ed1
SHA1 (patch-gcc_config_host-darwin.c) = bb6513d096bed62a3c40a6543c6c854e5c20ef9d
SHA1 (patch-gcc_plugin.c) = cd5b6a1255104760cf7c8e7092943c250b30e35c
-SHA1 (patch-gcc_system.h) = 72a75ff773b9b5f3d2f16f4ec7d29e032aba5f53
+SHA1 (patch-gcc_system.h) = 06d2aa59d1f34321ed7ff97167be193a54f3c81b
SHA1 (patch-libcc1_configure) = 0368733ddf79b109fcc7146b0baeb37ab31e634a
SHA1 (patch-libcc1_connection.cc) = 2acd56a6f62b29ed3f02eecb7bf103e4564a442c
SHA1 (patch-libiberty_Makefile.in) = 7ea2578b5b77cb4adcd4afe3d63739efc68a1540
Index: pkgsrc/cross/arm-none-eabi-gcc/patches/patch-gcc_system.h
diff -u pkgsrc/cross/arm-none-eabi-gcc/patches/patch-gcc_system.h:1.1 pkgsrc/cross/arm-none-eabi-gcc/patches/patch-gcc_system.h:1.2
--- pkgsrc/cross/arm-none-eabi-gcc/patches/patch-gcc_system.h:1.1 Wed Oct 19 12:48:26 2016
+++ pkgsrc/cross/arm-none-eabi-gcc/patches/patch-gcc_system.h Sun Dec 15 19:31:05 2024
@@ -1,8 +1,14 @@
-$NetBSD: patch-gcc_system.h,v 1.1 2016/10/19 12:48:26 ryoon Exp $
+$NetBSD: patch-gcc_system.h,v 1.2 2024/12/15 19:31:05 brook Exp $
---- gcc/system.h.orig 2015-01-05 12:33:28.000000000 +0000
+ Building gcc against libc++, e.g., with clang, poisons the ctype macros
+ due to including safe-ctype.h before including C++ standard headers such
+ as <list>, <map>, etc.
+
+ See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632
+
+--- gcc/system.h.orig 2018-02-16 09:05:35.000000000 +0000
+++ gcc/system.h
-@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3.
+@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3.
#endif
#include <stdio.h>
@@ -12,3 +18,63 @@ $NetBSD: patch-gcc_system.h,v 1.1 2016/1
/* Define a generic NULL if one hasn't already been defined. */
#ifndef NULL
+@@ -194,27 +197,8 @@ extern int fprintf_unlocked (FILE *, con
+ #undef fread_unlocked
+ #undef fwrite_unlocked
+
+-/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
+- the ctype macros through safe-ctype.h */
+-
+-#ifdef __cplusplus
+-#ifdef INCLUDE_STRING
+-# include <string>
+-#endif
+-#endif
+-
+-/* There are an extraordinary number of issues with <ctype.h>.
+- The last straw is that it varies with the locale. Use libiberty's
+- replacement instead. */
+-#include "safe-ctype.h"
+-
+-#include <sys/types.h>
+-
+-#include <errno.h>
+-
+-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
+-extern int errno;
+-#endif
++/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
++ poisoning the ctype macros through safe-ctype.h */
+
+ #ifdef __cplusplus
+ #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
+@@ -229,6 +213,9 @@ extern int errno;
+ #ifdef INCLUDE_SET
+ # include <set>
+ #endif
++#ifdef INCLUDE_STRING
++# include <string>
++#endif
+ #ifdef INCLUDE_VECTOR
+ # include <vector>
+ #endif
+@@ -237,6 +224,19 @@ extern int errno;
+ # include <utility>
+ #endif
+
++/* There are an extraordinary number of issues with <ctype.h>.
++ The last straw is that it varies with the locale. Use libiberty's
++ replacement instead. */
++#include "safe-ctype.h"
++
++#include <sys/types.h>
++
++#include <errno.h>
++
++#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
++extern int errno;
++#endif
++
+ /* Some of glibc's string inlines cause warnings. Plus we'd rather
+ rely on (and therefore test) GCC's string builtins. */
+ #define __NO_STRING_INLINES
Home |
Main Index |
Thread Index |
Old Index