NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/58999: ./build.sh fails on recent macOS
The following reply was made to PR toolchain/58999; it has been noted by GNATS.
From: Harold Gutch <logix%foobar.franken.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: toolchain/58999: ./build.sh fails on recent macOS
Date: Fri, 17 Jan 2025 11:02:41 +0100
--6lCXDTVICvIQMz0h
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
the gcc in current seems to already include that patch so that
shouldn't fail like this (except for vax which uses gcc.old).
As you put "netbsd-10" under "Release" I guess that is where you are
trying this - can you test if the attached patch fixes this for you?
thanks,
Harold
--6lCXDTVICvIQMz0h
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="pr58999_netbsd-10.patch"
--- src/external/gpl3/gcc/dist/gcc/system.h.orig
+++ src/external/gpl3/gcc/dist/gcc/system.h
@@ -200,27 +200,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
#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)
@@ -235,6 +216,9 @@ extern int errno;
#ifdef INCLUDE_SET
# include <set>
#endif
+#ifdef INCLUDE_STRING
+# include <string>
+#endif
#ifdef INCLUDE_VECTOR
# include <vector>
#endif
@@ -243,6 +227,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
--- src/external/gpl3/gcc/dist/libcc1/libcc1plugin.cc.orig
+++ src/external/gpl3/gcc/dist/libcc1/libcc1plugin.cc
@@ -31,6 +31,8 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
+#define INCLUDE_MEMORY
+#define INCLUDE_VECTOR
#include "gcc-plugin.h"
#include "system.h"
#include "coretypes.h"
--- src/external/gpl3/gcc/dist/libcc1/libcp1plugin.cc.orig
+++ src/external/gpl3/gcc/dist/libcc1/libcp1plugin.cc
@@ -32,6 +32,8 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
+#define INCLUDE_MEMORY
+#define INCLUDE_VECTOR
#include "gcc-plugin.h"
#include "system.h"
#include "coretypes.h"
--6lCXDTVICvIQMz0h--
Home |
Main Index |
Thread Index |
Old Index