pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gcc12: Restrict Xcode 5.3 patches to __APPLE__



Module Name:	pkgsrc-wip
Committed By:	Jason W. Bacon <bacon4000%gmail.com@localhost>
Pushed By:	outpaddling
Date:		Tue Jun 25 07:36:35 2024 -0500
Changeset:	fb1104bfe91f60ab1c63e54a5cd014f28056ed23

Modified Files:
	gcc12/distinfo
	gcc12/patches/patch-gcc_system.h
	gcc12/patches/patch-libcc1_libcc1plugin.cc
	gcc12/patches/patch-libcc1_libcp1plugin.cc
Removed Files:
	gcc12/patches/patch-gcc_cp_cvt.cc
	gcc12/patches/patch-gcc_tree.cc

Log Message:
gcc12: Restrict Xcode 5.3 patches to __APPLE__

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fb1104bfe91f60ab1c63e54a5cd014f28056ed23

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gcc12/distinfo                             |   8 +--
 gcc12/patches/patch-gcc_cp_cvt.cc          |  22 ------
 gcc12/patches/patch-gcc_system.h           | 108 +++++++++++++++--------------
 gcc12/patches/patch-gcc_tree.cc            |  22 ------
 gcc12/patches/patch-libcc1_libcc1plugin.cc |  17 +++--
 gcc12/patches/patch-libcc1_libcp1plugin.cc |  17 +++--
 6 files changed, 81 insertions(+), 113 deletions(-)

diffs:
diff --git a/gcc12/distinfo b/gcc12/distinfo
index 4827e3517b..22344fbc17 100644
--- a/gcc12/distinfo
+++ b/gcc12/distinfo
@@ -21,13 +21,11 @@ SHA1 (patch-gcc_config_arm_netbsd-eabi.h) = 85eb89de6f2e64fac50251f06d7e4eab3590
 SHA1 (patch-gcc_config_arm_netbsd-elf.h) = 367d83c808fd7b5b1989d0490b532ad06b425b31
 SHA1 (patch-gcc_config_nvptx_gen-opt.sh) = 67b8c84f198561c1d964a50946937a0a9cc26749
 SHA1 (patch-gcc_configure) = f13d23c46315d18fdbc3bbbad26d0763e2b27690
-SHA1 (patch-gcc_cp_cvt.cc) = 1004031816a887e140af7154dd605ac817118fe8
-SHA1 (patch-gcc_system.h) = b16b5b8382831068832cf7d79603b905ec01691e
+SHA1 (patch-gcc_system.h) = 95d3e6a3a175faa47c171089d4b8afcd7515305d
 SHA1 (patch-gcc_targhooks.cc) = 3bd54b7c3efc310aa2277f33cbd87b4a877cafea
-SHA1 (patch-gcc_tree.cc) = caa2d8e477e6c03b9f50705e84ac653257292bb7
 SHA1 (patch-isl_configure) = 5523c76d95b229b3cd25461b4c2b7af24bf2534e
-SHA1 (patch-libcc1_libcc1plugin.cc) = e93eccfbbb6f43461071ec6b87b1575cae8d122c
-SHA1 (patch-libcc1_libcp1plugin.cc) = c323e9118bd9860d1824e16e1af578aec4145c46
+SHA1 (patch-libcc1_libcc1plugin.cc) = 4160be1ce2fc41e968f3a26c3facd1f10c2757f8
+SHA1 (patch-libcc1_libcp1plugin.cc) = b3d3396fe25eb791a407f49e71719aee408dd5bc
 SHA1 (patch-libffi_configure) = 919bbe094e3ce547a0186eeaddb20a662595f79a
 SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 89e2dd6aaf2c1f75726f02362d8a8bf7178694ea
 SHA1 (patch-libgcc_config.host) = d40d4d08c807eeff98cc246d1ea756b5b2c749b0
diff --git a/gcc12/patches/patch-gcc_cp_cvt.cc b/gcc12/patches/patch-gcc_cp_cvt.cc
deleted file mode 100644
index 5eec0fd1b5..0000000000
--- a/gcc12/patches/patch-gcc_cp_cvt.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
-# Unpoison macros on NetBSD
-
---- gcc/cp/cvt.cc.orig	2024-06-24 19:46:45.127464308 +0000
-+++ gcc/cp/cvt.cc
-@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3.  
-    but what kind of conversions it does will depend on the language.  */
- 
- #include "config.h"
-+#include "escaped_string.h"
- #include "system.h"
- #include "coretypes.h"
- #include "target.h"
-@@ -35,7 +36,6 @@ along with GCC; see the file COPYING3.  
- #include "convert.h"
- #include "stringpool.h"
- #include "attribs.h"
--#include "escaped_string.h"
- 
- static tree convert_to_pointer_force (tree, tree, tsubst_flags_t);
- static tree build_type_conversion (tree, tree);
diff --git a/gcc12/patches/patch-gcc_system.h b/gcc12/patches/patch-gcc_system.h
index 35d896b13c..04db129814 100644
--- a/gcc12/patches/patch-gcc_system.h
+++ b/gcc12/patches/patch-gcc_system.h
@@ -1,55 +1,17 @@
 $NetBSD$
 
---- gcc/system.h.orig	2023-05-08 12:14:40.077167427 +0000
+# Xcode 5.3 build failure
+
+--- gcc/system.h.orig	2024-06-25 12:10:19.816843653 +0000
 +++ gcc/system.h
-@@ -194,27 +194,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 +210,9 @@ extern int errno;
- #ifdef INCLUDE_SET
- # include <set>
- #endif
-+#ifdef INCLUDE_STRING
-+# include <string>
-+#endif
- #ifdef INCLUDE_VECTOR
- # include <vector>
- #endif
-@@ -245,6 +229,19 @@ extern int errno;
- # include <type_traits>
- #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"
+@@ -206,6 +206,52 @@ extern int fprintf_unlocked (FILE *, con
+ /* 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.  */
++#ifdef __APPLE__	// Xcode 5.3 build failure
++
++// Build fails with Xcode 5.3 due to indirect includes
++// Include all system headers before safe-ctype.h
 +
 +#include <sys/types.h>
 +
@@ -58,19 +20,61 @@ $NetBSD$
 +#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
 +extern int errno;
 +#endif
++
++#ifdef __cplusplus
++#if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
++# include <algorithm>
++#endif
++#ifdef INCLUDE_LIST
++# include <list>
++#endif
++#ifdef INCLUDE_MAP
++# include <map>
++#endif
++#ifdef INCLUDE_SET
++# include <set>
++#endif
++#ifdef INCLUDE_VECTOR
++# include <vector>
++#endif
++#ifdef INCLUDE_ARRAY
++# include <array>
++#endif
++#ifdef INCLUDE_FUNCTIONAL
++# include <functional>
++#endif
++# include <cstring>
++# include <initializer_list>
++# include <new>
++# include <utility>
++# include <type_traits>
++#endif
++
++#include "safe-ctype.h"
++
++#else	// __APPLE__
++
+ #include "safe-ctype.h"
+ 
+ #include <sys/types.h>
+@@ -245,6 +291,8 @@ extern int errno;
+ # include <type_traits>
+ #endif
+ 
++#endif	// __APPLE__
 +
  /* 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
-@@ -270,9 +267,11 @@ extern int errno;
+@@ -270,9 +318,11 @@ extern int errno;
     that it is processed before we poison "malloc"; otherwise, if a source
     file uses a standard library header that includes <cstdlib>, we will get
     an error about 'using std::malloc'.  */
-+/*
++#ifndef __APPLE__	// Xcode 5.3 build failure
  #ifdef __cplusplus
  #include <cstdlib>
  #endif
-+*/
++#endif
  
  /* Undef vec_free from AIX stdlib.h header which conflicts with vec.h.  */
  #undef vec_free
diff --git a/gcc12/patches/patch-gcc_tree.cc b/gcc12/patches/patch-gcc_tree.cc
deleted file mode 100644
index a38f4b2fcc..0000000000
--- a/gcc12/patches/patch-gcc_tree.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
-# Unpoison macros on NetBSD
-
---- gcc/tree.cc.orig	2024-06-24 19:45:22.968928884 +0000
-+++ gcc/tree.cc
-@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3.  
-    calls language-dependent routines.  */
- 
- #include "config.h"
-+#include "escaped_string.h"
- #include "system.h"
- #include "coretypes.h"
- #include "backend.h"
-@@ -67,7 +68,6 @@ along with GCC; see the file COPYING3.  
- #include "regs.h"
- #include "tree-vector-builder.h"
- #include "gimple-fold.h"
--#include "escaped_string.h"
- #include "gimple-range.h"
- #include "gomp-constants.h"
- #include "dfp.h"
diff --git a/gcc12/patches/patch-libcc1_libcc1plugin.cc b/gcc12/patches/patch-libcc1_libcc1plugin.cc
index e36465c24b..428ee06909 100644
--- a/gcc12/patches/patch-libcc1_libcc1plugin.cc
+++ b/gcc12/patches/patch-libcc1_libcc1plugin.cc
@@ -1,21 +1,26 @@
 $NetBSD$
 
---- libcc1/libcc1plugin.cc.orig	2024-05-14 07:06:13.359508199 +0000
+# Xcode 5.3 build failure
+
+--- libcc1/libcc1plugin.cc.orig	2023-05-08 12:14:41.793192278 +0000
 +++ libcc1/libcc1plugin.cc
-@@ -32,6 +32,7 @@
+@@ -32,6 +32,9 @@
  #undef PACKAGE_VERSION
  
  #define INCLUDE_MEMORY
++#ifdef __APPLE__	// Xcode 5.3 build failure
 +#define INCLUDE_VECTOR
++#endif
  #include "gcc-plugin.h"
  #include "system.h"
  #include "coretypes.h"
-@@ -69,8 +70,6 @@
+@@ -69,7 +72,9 @@
  #include "gcc-c-interface.h"
  #include "context.hh"
  
--#include <vector>
--
++#ifndef __APPLE__	// Xcode 5.3 build failure
+ #include <vector>
++#endif
+ 
  using namespace cc1_plugin;
  
- 
diff --git a/gcc12/patches/patch-libcc1_libcp1plugin.cc b/gcc12/patches/patch-libcc1_libcp1plugin.cc
index f667b5d4b2..0cbd6de63b 100644
--- a/gcc12/patches/patch-libcc1_libcp1plugin.cc
+++ b/gcc12/patches/patch-libcc1_libcp1plugin.cc
@@ -1,21 +1,26 @@
 $NetBSD$
 
---- libcc1/libcp1plugin.cc.orig	2024-05-14 07:05:14.590094938 +0000
+# Xcode 5.3 build failure
+
+--- libcc1/libcp1plugin.cc.orig	2023-05-08 12:14:41.793192278 +0000
 +++ libcc1/libcp1plugin.cc
-@@ -33,6 +33,7 @@
+@@ -33,6 +33,9 @@
  #undef PACKAGE_VERSION
  
  #define INCLUDE_MEMORY
++#ifdef __APPLE__	// Xcode 5.3 build failure
 +#define INCLUDE_VECTOR
++#endif
  #include "gcc-plugin.h"
  #include "system.h"
  #include "coretypes.h"
-@@ -71,8 +72,6 @@
+@@ -71,7 +74,9 @@
  #include "rpc.hh"
  #include "context.hh"
  
--#include <vector>
--
++#ifndef __APPLE__	// Xcode 5.3 build failure
+ #include <vector>
++#endif
+ 
  using namespace cc1_plugin;
  
- 


Home | Main Index | Thread Index | Old Index