diff options
author | jperkin <jperkin@pkgsrc.org> | 2015-11-03 13:59:10 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2015-11-03 13:59:10 +0000 |
commit | 3725cd682cdf286a86a335e2d2fe54888c6439ef (patch) | |
tree | 8bf1c898bcbbb42b610568b237cdc951b3fac8cf /lang/gcc48 | |
parent | 387cef6e20aa202218f3c3998b28903b4b9113a2 (diff) | |
download | pkgsrc-3725cd682cdf286a86a335e2d2fe54888c6439ef.tar.gz |
Various fixes to get this working on El Capitan / Xcode 7:
* Pull in patch from MacPorts to handle 10.11 SDK header issue
with fixincludes.
* Backport upstream bugfix for GCC bug 66523, fixing an issue
with Xcode 7.
* Pull in --with-build-config=bootstrap-debug change from FreeBSD
ports to fix bootstrap compare issue seen with clang / Xcode 7.
Diffstat (limited to 'lang/gcc48')
-rw-r--r-- | lang/gcc48/Makefile | 7 | ||||
-rw-r--r-- | lang/gcc48/distinfo | 7 | ||||
-rw-r--r-- | lang/gcc48/patches/patch-fixincludes_fixincl.x | 312 | ||||
-rw-r--r-- | lang/gcc48/patches/patch-fixincludes_inclhack.def | 88 | ||||
-rw-r--r-- | lang/gcc48/patches/patch-gcc_config_darwin.c | 16 |
5 files changed, 420 insertions, 10 deletions
diff --git a/lang/gcc48/Makefile b/lang/gcc48/Makefile index 27a7203e034..f2fc22356e9 100644 --- a/lang/gcc48/Makefile +++ b/lang/gcc48/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21 2015/10/09 11:27:23 jperkin Exp $ +# $NetBSD: Makefile,v 1.22 2015/11/03 13:59:10 jperkin Exp $ GCC_PKGNAME= gcc48 .include "version.mk" @@ -85,6 +85,11 @@ MAKE_ENV+= ac_cv_func_clock_gettime=yes .if ${OPSYS} == "DragonFly" CONFIGURE_ARGS+= --disable-bootstrap .endif +.if ${OPSYS} == "Darwin" && !empty(OSX_SDK_PATH) +CONFIGURE_ARGS+= --with-native-system-header-dir=${OSX_SDK_PATH}/usr/include +# From FreeBSD, avoids compare issues with clang +CONFIGURE_ARGS+= --with-build-config=bootstrap-debug +.endif .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 diff --git a/lang/gcc48/distinfo b/lang/gcc48/distinfo index 2caef951d0f..15f9b83eea9 100644 --- a/lang/gcc48/distinfo +++ b/lang/gcc48/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.26 2015/08/25 19:57:00 wiedi Exp $ +$NetBSD: distinfo,v 1.27 2015/11/03 13:59:10 jperkin Exp $ SHA1 (ecj-4.5.jar) = 58c1d79c64c8cd718550f32a932ccfde8d1e6449 RMD160 (ecj-4.5.jar) = d3f4da657f086b6423f74e93f001132f4855368a @@ -17,8 +17,8 @@ SHA1 (patch-boehm-gc_misc.c) = 11bf4eb2e8c54b195904b3f52bd35d5f979058f1 SHA1 (patch-boehm-gc_os__dep.c) = add0c7e59739cc7c6a248c68d048ebec6700a037 SHA1 (patch-boehm-gc_pthread__support.c) = b0d66aba1fbf419eb8cf04fd1fd8584e8f92df8d SHA1 (patch-boehm-gc_threadlibs.c) = 4cac00c47354d506f69cc784dfcf0b65c5af3237 -SHA1 (patch-fixincludes_fixincl.x) = b53bf6ae3ef1a0cc6d3ce1153f926ed208816c90 -SHA1 (patch-fixincludes_inclhack.def) = 577021b838b64ff987e28b0017afb3b05e28458f +SHA1 (patch-fixincludes_fixincl.x) = 5fe9210bebf85643932ff681ed4533fcfb71d687 +SHA1 (patch-fixincludes_inclhack.def) = 42ea2818dbc3e59e635bbe55ff9d660744a794f9 SHA1 (patch-gcc-config-vax-constraints.md) = e6cea7a5334b5b124ca3e8b62eba45423e788e55 SHA1 (patch-gcc-config-vax-vax.c) = 02e389ec418a0fee1431ecd61d65b7f8d7629785 SHA1 (patch-gcc-config-vax-vax.md) = e06696be85641cbe9131ecc10bb28c45a465916d @@ -27,6 +27,7 @@ SHA1 (patch-gcc_builtins.c) = 67c66568237b68b22ba99bc76336e001e1634925 SHA1 (patch-gcc_c-family_c-format.c) = 485ebb16ff3c0c785678326ff4d622c865849850 SHA1 (patch-gcc_config.gcc) = 1a697bcc295c40bc1bbed6295f53854d56df9f93 SHA1 (patch-gcc_config.host) = 1b1e11cd199eb93f49443d51c0063b09b7327858 +SHA1 (patch-gcc_config_darwin.c) = caff312fbc948a1c2730decbab435dbd3caa203f SHA1 (patch-gcc_config_dragonfly-stdint.h) = 740dc819b446d5f1476506322c4b280ffdb5a6c0 SHA1 (patch-gcc_config_dragonfly.h) = 82f549cdc7543b4bf413a44d481ef42b10f59c82 SHA1 (patch-gcc_config_dragonfly.opt) = 92f615c73c2e94664bae5b5935ab8b09bca15f73 diff --git a/lang/gcc48/patches/patch-fixincludes_fixincl.x b/lang/gcc48/patches/patch-fixincludes_fixincl.x index dc21d9ad9da..745ff888f16 100644 --- a/lang/gcc48/patches/patch-fixincludes_fixincl.x +++ b/lang/gcc48/patches/patch-fixincludes_fixincl.x @@ -1,8 +1,258 @@ -$NetBSD: patch-fixincludes_fixincl.x,v 1.1 2014/05/31 13:06:25 ryoon Exp $ +$NetBSD: patch-fixincludes_fixincl.x,v 1.2 2015/11/03 13:59:10 jperkin Exp $ ---- fixincludes/fixincl.x.orig 2013-05-31 11:43:36.000000000 +0000 +Fix for El Capitan / Xcode 7 from https://trac.macports.org/ticket/48471 + +--- fixincludes/fixincl.x.orig 2014-12-13 17:47:30.000000000 +0000 +++ fixincludes/fixincl.x -@@ -6154,11 +6154,11 @@ static const char* apzSolaris_Complex_Cx +@@ -1,12 +1,12 @@ + /* -*- buffer-read-only: t -*- vi: set ro: +- * ++ * + * DO NOT EDIT THIS FILE (fixincl.x) +- * +- * It has been AutoGen-ed December 13, 2014 at 05:31:32 AM by AutoGen 5.12 ++ * ++ * It has been AutoGen-ed + * From the definitions inclhack.def + * and the template file fixincl + */ +-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Dec 13 05:31:32 PST 2014 ++/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Oct 9 05:27:32 CEST 2015 + * + * You must regenerate it. Use the ./genfixes script. + * +@@ -15,7 +15,7 @@ + * certain ANSI-incompatible system header files which are fixed to work + * correctly with ANSI C and placed in a directory that GNU C will search. + * +- * This file contains 227 fixup descriptions. ++ * This file contains 232 fixup descriptions. + * + * See README for more information. + * +@@ -2092,6 +2092,221 @@ static const char* apzCdef_CplusplusPatc + + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * ++ * Description of Clang_Macro___Has_Builtin fix ++ */ ++tSCC zClang_Macro___Has_BuiltinName[] = ++ "clang_macro___has_builtin"; ++ ++/* ++ * File name selection pattern ++ */ ++#define zClang_Macro___Has_BuiltinList (char*)NULL ++/* ++ * Machine/OS name selection pattern ++ */ ++#define apzClang_Macro___Has_BuiltinMachs (const char**)NULL ++ ++/* ++ * content selection pattern - do fix if pattern found ++ */ ++tSCC zClang_Macro___Has_BuiltinSelect0[] = ++ "__has_builtin"; ++ ++/* ++ * content bypass pattern - skip fix if pattern found ++ */ ++tSCC zClang_Macro___Has_BuiltinBypass0[] = ++ "#[ \t]*define[ \t]+__has_builtin"; ++ ++#define CLANG_MACRO___HAS_BUILTIN_TEST_CT 2 ++static tTestDesc aClang_Macro___Has_BuiltinTests[] = { ++ { TT_NEGREP, zClang_Macro___Has_BuiltinBypass0, (regex_t*)NULL }, ++ { TT_EGREP, zClang_Macro___Has_BuiltinSelect0, (regex_t*)NULL }, }; ++ ++/* ++ * Fix Command Arguments for Clang_Macro___Has_Builtin ++ */ ++static const char* apzClang_Macro___Has_BuiltinPatch[] = { ++ "wrap", ++ "#ifndef __has_builtin\n\ ++ #define __has_builtin(x) 0\n\ ++#endif\n", ++ (char*)NULL }; ++ ++/* * * * * * * * * * * * * * * * * * * * * * * * * * ++ * ++ * Description of Clang_Macro___Has_Feature fix ++ */ ++tSCC zClang_Macro___Has_FeatureName[] = ++ "clang_macro___has_feature"; ++ ++/* ++ * File name selection pattern ++ */ ++#define zClang_Macro___Has_FeatureList (char*)NULL ++/* ++ * Machine/OS name selection pattern ++ */ ++#define apzClang_Macro___Has_FeatureMachs (const char**)NULL ++ ++/* ++ * content selection pattern - do fix if pattern found ++ */ ++tSCC zClang_Macro___Has_FeatureSelect0[] = ++ "__has_feature"; ++ ++/* ++ * content bypass pattern - skip fix if pattern found ++ */ ++tSCC zClang_Macro___Has_FeatureBypass0[] = ++ "#[ \t]*define[ \t]+__has_feature"; ++ ++#define CLANG_MACRO___HAS_FEATURE_TEST_CT 2 ++static tTestDesc aClang_Macro___Has_FeatureTests[] = { ++ { TT_NEGREP, zClang_Macro___Has_FeatureBypass0, (regex_t*)NULL }, ++ { TT_EGREP, zClang_Macro___Has_FeatureSelect0, (regex_t*)NULL }, }; ++ ++/* ++ * Fix Command Arguments for Clang_Macro___Has_Feature ++ */ ++static const char* apzClang_Macro___Has_FeaturePatch[] = { ++ "wrap", ++ "#ifndef __has_feature\n\ ++ #define __has_feature(x) 0\n\ ++#endif\n", ++ (char*)NULL }; ++ ++/* * * * * * * * * * * * * * * * * * * * * * * * * * ++ * ++ * Description of Clang_Macro___Has_Cpp_Attribute fix ++ */ ++tSCC zClang_Macro___Has_Cpp_AttributeName[] = ++ "clang_macro___has_cpp_attribute"; ++ ++/* ++ * File name selection pattern ++ */ ++#define zClang_Macro___Has_Cpp_AttributeList (char*)NULL ++/* ++ * Machine/OS name selection pattern ++ */ ++#define apzClang_Macro___Has_Cpp_AttributeMachs (const char**)NULL ++ ++/* ++ * content selection pattern - do fix if pattern found ++ */ ++tSCC zClang_Macro___Has_Cpp_AttributeSelect0[] = ++ "__has_cpp_attribute"; ++ ++/* ++ * content bypass pattern - skip fix if pattern found ++ */ ++tSCC zClang_Macro___Has_Cpp_AttributeBypass0[] = ++ "#[ \t]*define[ \t]+__has_cpp_attribute"; ++ ++#define CLANG_MACRO___HAS_CPP_ATTRIBUTE_TEST_CT 2 ++static tTestDesc aClang_Macro___Has_Cpp_AttributeTests[] = { ++ { TT_NEGREP, zClang_Macro___Has_Cpp_AttributeBypass0, (regex_t*)NULL }, ++ { TT_EGREP, zClang_Macro___Has_Cpp_AttributeSelect0, (regex_t*)NULL }, }; ++ ++/* ++ * Fix Command Arguments for Clang_Macro___Has_Cpp_Attribute ++ */ ++static const char* apzClang_Macro___Has_Cpp_AttributePatch[] = { ++ "wrap", ++ "#ifndef __has_cpp_attribute\n\ ++ #define __has_cpp_attribute(x) 0\n\ ++#endif\n", ++ (char*)NULL }; ++ ++/* * * * * * * * * * * * * * * * * * * * * * * * * * ++ * ++ * Description of Clang_Macro___Has_Attribute fix ++ */ ++tSCC zClang_Macro___Has_AttributeName[] = ++ "clang_macro___has_attribute"; ++ ++/* ++ * File name selection pattern ++ */ ++#define zClang_Macro___Has_AttributeList (char*)NULL ++/* ++ * Machine/OS name selection pattern ++ */ ++#define apzClang_Macro___Has_AttributeMachs (const char**)NULL ++ ++/* ++ * content selection pattern - do fix if pattern found ++ */ ++tSCC zClang_Macro___Has_AttributeSelect0[] = ++ "__has_attribute"; ++ ++/* ++ * content bypass pattern - skip fix if pattern found ++ */ ++tSCC zClang_Macro___Has_AttributeBypass0[] = ++ "#[ \t]*define[ \t]+__has_attribute"; ++ ++#define CLANG_MACRO___HAS_ATTRIBUTE_TEST_CT 2 ++static tTestDesc aClang_Macro___Has_AttributeTests[] = { ++ { TT_NEGREP, zClang_Macro___Has_AttributeBypass0, (regex_t*)NULL }, ++ { TT_EGREP, zClang_Macro___Has_AttributeSelect0, (regex_t*)NULL }, }; ++ ++/* ++ * Fix Command Arguments for Clang_Macro___Has_Attribute ++ */ ++static const char* apzClang_Macro___Has_AttributePatch[] = { ++ "wrap", ++ "#ifndef __has_attribute\n\ ++ #define __has_attribute(x) 0\n\ ++#endif\n", ++ (char*)NULL }; ++ ++/* * * * * * * * * * * * * * * * * * * * * * * * * * ++ * ++ * Description of Clang_Macro___Has_Declspec_Attribute fix ++ */ ++tSCC zClang_Macro___Has_Declspec_AttributeName[] = ++ "clang_macro___has_declspec_attribute"; ++ ++/* ++ * File name selection pattern ++ */ ++#define zClang_Macro___Has_Declspec_AttributeList (char*)NULL ++/* ++ * Machine/OS name selection pattern ++ */ ++#define apzClang_Macro___Has_Declspec_AttributeMachs (const char**)NULL ++ ++/* ++ * content selection pattern - do fix if pattern found ++ */ ++tSCC zClang_Macro___Has_Declspec_AttributeSelect0[] = ++ "__has_declspec_attribute"; ++ ++/* ++ * content bypass pattern - skip fix if pattern found ++ */ ++tSCC zClang_Macro___Has_Declspec_AttributeBypass0[] = ++ "#[ \t]*define[ \t]+__has_declspec_attribute"; ++ ++#define CLANG_MACRO___HAS_DECLSPEC_ATTRIBUTE_TEST_CT 2 ++static tTestDesc aClang_Macro___Has_Declspec_AttributeTests[] = { ++ { TT_NEGREP, zClang_Macro___Has_Declspec_AttributeBypass0, (regex_t*)NULL }, ++ { TT_EGREP, zClang_Macro___Has_Declspec_AttributeSelect0, (regex_t*)NULL }, }; ++ ++/* ++ * Fix Command Arguments for Clang_Macro___Has_Declspec_Attribute ++ */ ++static const char* apzClang_Macro___Has_Declspec_AttributePatch[] = { ++ "wrap", ++ "#ifndef __has_declspec_attribute\n\ ++ #define __has_declspec_attribute(x) 0\n\ ++#endif\n", ++ (char*)NULL }; ++ ++/* * * * * * * * * * * * * * * * * * * * * * * * * * ++ * + * Description of Ctrl_Quotes_Def fix + */ + tSCC zCtrl_Quotes_DefName[] = +@@ -6193,11 +6408,11 @@ static const char* apzSolaris_Complex_Cx "-e", "/#if[ \t]*!defined(__cplusplus)/c\\\n\ #ifdef\t__cplusplus\\\n\ extern \"C\" {\\\n\ @@ -16,3 +266,59 @@ $NetBSD: patch-fixincludes_fixincl.x,v 1.1 2014/05/31 13:06:25 ryoon Exp $ (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * +@@ -9304,9 +9519,9 @@ static const char* apzFeraiseexcept_Noss + * + * List of all fixes + */ +-#define REGEX_COUNT 265 ++#define REGEX_COUNT 275 + #define MACH_LIST_SIZE_LIMIT 187 +-#define FIX_COUNT 227 ++#define FIX_COUNT 232 + + /* + * Enumerate the fixes +@@ -9359,6 +9574,11 @@ typedef enum { + BROKEN_NAN_FIXIDX, + BSD_STDIO_ATTRS_CONFLICT_FIXIDX, + CDEF_CPLUSPLUS_FIXIDX, ++ CLANG_MACRO___HAS_BUILTIN_FIXIDX, ++ CLANG_MACRO___HAS_FEATURE_FIXIDX, ++ CLANG_MACRO___HAS_CPP_ATTRIBUTE_FIXIDX, ++ CLANG_MACRO___HAS_ATTRIBUTE_FIXIDX, ++ CLANG_MACRO___HAS_DECLSPEC_ATTRIBUTE_FIXIDX, + CTRL_QUOTES_DEF_FIXIDX, + CTRL_QUOTES_USE_FIXIDX, + CXX_UNREADY_FIXIDX, +@@ -9777,6 +9997,31 @@ tFixDesc fixDescList[ FIX_COUNT ] = { + CDEF_CPLUSPLUS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aCdef_CplusplusTests, apzCdef_CplusplusPatch, 0 }, + ++ { zClang_Macro___Has_BuiltinName, zClang_Macro___Has_BuiltinList, ++ apzClang_Macro___Has_BuiltinMachs, ++ CLANG_MACRO___HAS_BUILTIN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ++ aClang_Macro___Has_BuiltinTests, apzClang_Macro___Has_BuiltinPatch, 0 }, ++ ++ { zClang_Macro___Has_FeatureName, zClang_Macro___Has_FeatureList, ++ apzClang_Macro___Has_FeatureMachs, ++ CLANG_MACRO___HAS_FEATURE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ++ aClang_Macro___Has_FeatureTests, apzClang_Macro___Has_FeaturePatch, 0 }, ++ ++ { zClang_Macro___Has_Cpp_AttributeName, zClang_Macro___Has_Cpp_AttributeList, ++ apzClang_Macro___Has_Cpp_AttributeMachs, ++ CLANG_MACRO___HAS_CPP_ATTRIBUTE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ++ aClang_Macro___Has_Cpp_AttributeTests, apzClang_Macro___Has_Cpp_AttributePatch, 0 }, ++ ++ { zClang_Macro___Has_AttributeName, zClang_Macro___Has_AttributeList, ++ apzClang_Macro___Has_AttributeMachs, ++ CLANG_MACRO___HAS_ATTRIBUTE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ++ aClang_Macro___Has_AttributeTests, apzClang_Macro___Has_AttributePatch, 0 }, ++ ++ { zClang_Macro___Has_Declspec_AttributeName, zClang_Macro___Has_Declspec_AttributeList, ++ apzClang_Macro___Has_Declspec_AttributeMachs, ++ CLANG_MACRO___HAS_DECLSPEC_ATTRIBUTE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ++ aClang_Macro___Has_Declspec_AttributeTests, apzClang_Macro___Has_Declspec_AttributePatch, 0 }, ++ + { zCtrl_Quotes_DefName, zCtrl_Quotes_DefList, + apzCtrl_Quotes_DefMachs, + CTRL_QUOTES_DEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/lang/gcc48/patches/patch-fixincludes_inclhack.def b/lang/gcc48/patches/patch-fixincludes_inclhack.def index 0f070ebc60b..667434c568c 100644 --- a/lang/gcc48/patches/patch-fixincludes_inclhack.def +++ b/lang/gcc48/patches/patch-fixincludes_inclhack.def @@ -1,8 +1,90 @@ -$NetBSD: patch-fixincludes_inclhack.def,v 1.1 2014/05/31 13:06:25 ryoon Exp $ +$NetBSD: patch-fixincludes_inclhack.def,v 1.2 2015/11/03 13:59:10 jperkin Exp $ ---- fixincludes/inclhack.def.orig 2013-05-31 11:43:36.000000000 +0000 +Fix for El Capitan / Xcode 7 from https://trac.macports.org/ticket/48471 + +--- fixincludes/inclhack.def.orig 2014-12-13 17:47:30.000000000 +0000 +++ fixincludes/inclhack.def -@@ -3213,9 +3213,9 @@ fix = { +@@ -1141,6 +1141,79 @@ fix = { + test_text = "#define _Noreturn [[noreturn]]"; + }; + ++/* ++ * Add definitions of non-standard (clang) macros. ++ */ ++fix = { ++ hackname = clang_macro___has_builtin; ++ select = "__has_builtin"; ++ bypass = "#[ \t]*define[ \t]+__has_builtin"; ++ c_fix = wrap; ++ c_fix_arg = "#ifndef __has_builtin\n" ++ " #define __has_builtin(x) 0\n" ++ "#endif\n"; ++ test_text = "#if __has_builtin(__builtin_trap)\n" ++ " __builtin_trap();\n" ++ "#else\n" ++ " abort();\n" ++ "#endif\n"; ++}; ++fix = { ++ hackname = clang_macro___has_feature; ++ select = "__has_feature"; ++ bypass = "#[ \t]*define[ \t]+__has_feature"; ++ c_fix = wrap; ++ c_fix_arg = "#ifndef __has_feature\n" ++ " #define __has_feature(x) 0\n" ++ "#endif\n"; ++ test_text = "#if __has_feature(cxx_rvalue_references)\n" ++ " // This code will only be compiled with the -std=c++11 and -std=gnu++11\n" ++ " // options, because rvalue references are only standardized in C++11.\n" ++ "#endif\n"; ++}; ++fix = { ++ hackname = clang_macro___has_cpp_attribute; ++ select = "__has_cpp_attribute"; ++ bypass = "#[ \t]*define[ \t]+__has_cpp_attribute"; ++ c_fix = wrap; ++ c_fix_arg = "#ifndef __has_cpp_attribute\n" ++ " #define __has_cpp_attribute(x) 0\n" ++ "#endif\n"; ++ test_text = "#if __has_cpp_attribute(clang::fallthrough)\n" ++ " #define FALLTHROUGH [[clang::fallthrough]]\n" ++ "#else\n" ++ " #define FALLTHROUGH\n" ++ "#endif\n"; ++}; ++fix = { ++ hackname = clang_macro___has_attribute; ++ select = "__has_attribute"; ++ bypass = "#[ \t]*define[ \t]+__has_attribute"; ++ c_fix = wrap; ++ c_fix_arg = "#ifndef __has_attribute\n" ++ " #define __has_attribute(x) 0\n" ++ "#endif\n"; ++ test_text = "#if __has_attribute(always_inline)\n" ++ " #define ALWAYS_INLINE __attribute__((always_inline))\n" ++ "#else\n" ++ " #define ALWAYS_INLINE\n" ++ "#endif\n"; ++}; ++fix = { ++ hackname = clang_macro___has_declspec_attribute; ++ select = "__has_declspec_attribute"; ++ bypass = "#[ \t]*define[ \t]+__has_declspec_attribute"; ++ c_fix = wrap; ++ c_fix_arg = "#ifndef __has_declspec_attribute\n" ++ " #define __has_declspec_attribute(x) 0\n" ++ "#endif\n"; ++ test_text = "#if __has_declspec_attribute(dllexport)\n" ++ " #define DLLEXPORT __declspec(dllexport)\n" ++ "#else\n" ++ " #define DLLEXPORT\n" ++ "#endif\n"; ++}; ++ + /* + * Fix various macros used to define ioctl numbers. + * The traditional syntax was: +@@ -3226,9 +3299,9 @@ fix = { mach = "*-*-solaris2.*"; files = complex.h; sed = "/#if[ \t]*!defined(__cplusplus)/c\\\n" diff --git a/lang/gcc48/patches/patch-gcc_config_darwin.c b/lang/gcc48/patches/patch-gcc_config_darwin.c new file mode 100644 index 00000000000..1125f2e0e35 --- /dev/null +++ b/lang/gcc48/patches/patch-gcc_config_darwin.c @@ -0,0 +1,16 @@ +$NetBSD: patch-gcc_config_darwin.c,v 1.1 2015/11/03 13:59:10 jperkin Exp $ + +Backport fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66523 + +--- gcc/config/darwin.c.orig 2014-04-07 06:40:18.000000000 +0000 ++++ gcc/config/darwin.c +@@ -1204,6 +1204,9 @@ darwin_encode_section_info (tree decl, r + void + darwin_mark_decl_preserved (const char *name) + { ++ if (darwin_label_is_anonymous_local_objc_name (name)) ++ return; ++ + fprintf (asm_out_file, "\t.no_dead_strip "); + assemble_name (asm_out_file, name); + fputc ('\n', asm_out_file); |