diff options
author | minskim <minskim@pkgsrc.org> | 2019-10-19 21:20:38 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2019-10-19 21:20:38 +0000 |
commit | 757a021a2f79f7c681bb8ea0928af723a40cacc7 (patch) | |
tree | 3a7241d0dfca91f16065a86c00deef83c09bb676 /lang/gcc8 | |
parent | d2c120895cc6a41a71d3f5d2e1adc98a227302b5 (diff) | |
download | pkgsrc-757a021a2f79f7c681bb8ea0928af723a40cacc7.tar.gz |
lang/gcc8: Make this build on macOS Catalina
A patch from Homebrew:
https://github.com/Homebrew/homebrew-core/pull/44762
Diffstat (limited to 'lang/gcc8')
-rw-r--r-- | lang/gcc8/distinfo | 4 | ||||
-rw-r--r-- | lang/gcc8/patches/patch-fixincludes_fixincl.x | 88 | ||||
-rw-r--r-- | lang/gcc8/patches/patch-fixincludes_inclhack.def | 36 |
3 files changed, 127 insertions, 1 deletions
diff --git a/lang/gcc8/distinfo b/lang/gcc8/distinfo index 4a551d15821..32e4218d62b 100644 --- a/lang/gcc8/distinfo +++ b/lang/gcc8/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2019/08/06 06:16:15 maya Exp $ +$NetBSD: distinfo,v 1.11 2019/10/19 21:20:38 minskim Exp $ SHA1 (gcc-8.3.0.tar.xz) = c27f4499dd263fe4fb01bcc5565917f3698583b2 RMD160 (gcc-8.3.0.tar.xz) = 59396f7136301466d0ec15eb7307558c0da692df @@ -9,6 +9,8 @@ RMD160 (isl-0.16.1.tar.bz2) = 5a99db3fe0d0a1f6bbac1ed4448f2403495c55b2 SHA512 (isl-0.16.1.tar.bz2) = c188667a84dc5bdddb4ab7c35f89c91bf15a8171f4fcaf41301cf285fb7328846d9a367c096012fec4cc69d244f0bc9e95d84c09ec097394cd4093076f2a041b Size (isl-0.16.1.tar.bz2) = 1626446 bytes SHA1 (patch-contrib_download__prerequisites) = 9cdcde21ab174052911447d20762ddfd40aa8791 +SHA1 (patch-fixincludes_fixincl.x) = e78103bbc1783f18e39cab5f31a73767617b2a79 +SHA1 (patch-fixincludes_inclhack.def) = 7bc5afb89118bf46c66a34a0f325f0748dd081db SHA1 (patch-gcc_Makefile.in) = c0f97c75ba1d37eae894141edd58bb36b734f651 SHA1 (patch-gcc_config.gcc) = 4a971d1df7f05cfaefdf462d1b7c6dea1e838713 SHA1 (patch-gcc_config_aarch64_aarch64-builtins.c) = b10ef4b9ad39e605fc4e2a0c8dffdae677842e94 diff --git a/lang/gcc8/patches/patch-fixincludes_fixincl.x b/lang/gcc8/patches/patch-fixincludes_fixincl.x new file mode 100644 index 00000000000..0ec5e1592d3 --- /dev/null +++ b/lang/gcc8/patches/patch-fixincludes_fixincl.x @@ -0,0 +1,88 @@ +$NetBSD: patch-fixincludes_fixincl.x,v 1.1 2019/10/19 21:20:38 minskim Exp $ + +A workaround for Catalina SDK bug from +https://github.com/Homebrew/homebrew-core/pull/44762 + +--- fixincludes/fixincl.x.orig 2018-02-22 08:12:26.000000000 -0800 ++++ fixincludes/fixincl.x 2019-10-18 18:16:11.000000000 -0700 +@@ -2584,6 +2584,48 @@ + + /* * * * * * * * * * * * * * * * * * * * * * * * * * + * ++ * Description of Darwin_Availability fix ++ */ ++tSCC zDarwin_AvailabilityName[] = ++ "darwin_availability"; ++ ++/* ++ * File name selection pattern ++ */ ++tSCC zDarwin_AvailabilityList[] = ++ "Availability.h\0"; ++/* ++ * Machine/OS name selection pattern ++ */ ++tSCC* apzDarwin_AvailabilityMachs[] = { ++ "*-*-darwin*", ++ (const char*)NULL }; ++ ++/* ++ * content selection pattern - do fix if pattern found ++ */ ++tSCC zDarwin_AvailabilitySelect0[] = ++ "#endif /\\* __OSX_AVAILABLE_STARTING \\*/"; ++ ++#define DARWIN_AVAILABILITY_TEST_CT 1 ++static tTestDesc aDarwin_AvailabilityTests[] = { ++ { TT_EGREP, zDarwin_AvailabilitySelect0, (regex_t*)NULL }, }; ++ ++/* ++ * Fix Command Arguments for Darwin_Availability ++ */ ++static const char* apzDarwin_AvailabilityPatch[] = { ++ "format", ++ "#endif /* __OSX_AVAILABLE_STARTING */\n\ ++#ifndef __OSX_AVAILABLE_STARTING\n\ ++ #define __OSX_AVAILABLE_STARTING(_osx, _ios)\n\ ++ #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep)\n\ ++ #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg)\n\ ++#endif", ++ (char*)NULL }; ++ ++/* * * * * * * * * * * * * * * * * * * * * * * * * * ++ * + * Description of Darwin_9_Long_Double_Funcs_2 fix + */ + tSCC zDarwin_9_Long_Double_Funcs_2Name[] = +@@ -10099,9 +10141,9 @@ + * + * List of all fixes + */ +-#define REGEX_COUNT 287 ++#define REGEX_COUNT 288 + #define MACH_LIST_SIZE_LIMIT 187 +-#define FIX_COUNT 249 ++#define FIX_COUNT 250 + + /* + * Enumerate the fixes +@@ -10168,6 +10210,7 @@ + CTRL_QUOTES_USE_FIXIDX, + CXX_UNREADY_FIXIDX, + DARWIN_AVAILABILITYINTERNAL_FIXIDX, ++ DARWIN_AVAILABILITY_FIXIDX, + DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, + DARWIN_EXTERNC_FIXIDX, + DARWIN_GCC4_BREAKAGE_FIXIDX, +@@ -10664,6 +10707,11 @@ + DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_AvailabilityinternalTests, apzDarwin_AvailabilityinternalPatch, 0 }, + ++ { zDarwin_AvailabilityName, zDarwin_AvailabilityList, ++ apzDarwin_AvailabilityMachs, ++ DARWIN_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, ++ aDarwin_AvailabilityTests, apzDarwin_AvailabilityPatch, 0 }, ++ + { zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List, + apzDarwin_9_Long_Double_Funcs_2Machs, + DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/lang/gcc8/patches/patch-fixincludes_inclhack.def b/lang/gcc8/patches/patch-fixincludes_inclhack.def new file mode 100644 index 00000000000..f4f35b113bf --- /dev/null +++ b/lang/gcc8/patches/patch-fixincludes_inclhack.def @@ -0,0 +1,36 @@ +$NetBSD: patch-fixincludes_inclhack.def,v 1.1 2019/10/19 21:20:38 minskim Exp $ + +A workaround for Catalina SDK bug from +https://github.com/Homebrew/homebrew-core/pull/44762 + +--- fixincludes/inclhack.def.orig 2018-02-22 08:12:26.000000000 -0800 ++++ fixincludes/inclhack.def 2019-10-18 18:17:01.000000000 -0700 +@@ -1268,6 +1268,28 @@ + }; + + /* ++ * macOS 10.15 <Availability.h> does not define __OSX_AVAILABLE_STARTING on ++ * non-clang compilers. ++ */ ++fix = { ++ hackname = darwin_availability; ++ mach = "*-*-darwin*"; ++ files = Availability.h; ++ select = "#endif /\\* __OSX_AVAILABLE_STARTING \\*/"; ++ c_fix = format; ++ c_fix_arg = <<- _EOFix_ ++ #endif /* __OSX_AVAILABLE_STARTING */ ++ #ifndef __OSX_AVAILABLE_STARTING ++ #define __OSX_AVAILABLE_STARTING(_osx, _ios) ++ #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) ++ #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) ++ #endif ++ _EOFix_; ++ ++ test_text = "#endif /* __OSX_AVAILABLE_STARTING */"; ++}; ++ ++/* + * For the AAB_darwin7_9_long_double_funcs fix to be useful, + * you have to not use "" includes. + */ |