gcc14: add aarch64-darwin support

This commit is contained in:
Weijia Wang
2024-05-21 12:08:26 +02:00
parent 75104490c0
commit d851de2647
3 changed files with 8 additions and 0 deletions
@@ -15,6 +15,7 @@
, libucontext ? null
, libxcrypt ? null
, cloog ? null
, darwin ? null
, isl ? null
, zlib ? null
, gnat-bootstrap ? null
@@ -85,6 +86,7 @@ in
++ optionals langJava [ boehmgc zip unzip ]
++ optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)
++ optionals (langGo && stdenv.hostPlatform.isMusl) [ libucontext ]
++ optionals (lib.versionAtLeast version "14" && stdenv.hostPlatform.isDarwin) [ darwin.apple_sdk.frameworks.CoreServices ]
;
# threadsCross.package after gcc6 so i assume its okay for 4.8 and 4.9 too
@@ -129,6 +129,7 @@ let
buildPackages
cloog
withoutTargetLibc
darwin
disableBootstrap
disableGdbPlugin
enableLTO
@@ -139,6 +139,11 @@ in
# We only apply this patch when building a native toolchain for aarch64-darwin, as it breaks building
# a foreign one: https://github.com/iains/gcc-12-branch/issues/18
++ optionals (stdenv.isDarwin && stdenv.isAarch64 && buildPlatform == hostPlatform && hostPlatform == targetPlatform) ({
"14" = [ (fetchpatch {
name = "gcc-14-darwin-aarch64-support.patch";
url = "https://raw.githubusercontent.com/Homebrew/formula-patches/82b5c1cd38826ab67ac7fc498a8fe74376a40f4a/gcc/gcc-14.1.0.diff";
sha256 = "sha256-jCY65l1DGdESNyzEmD8FFC/xMmqeqBIQF+BhT4uTBBU=";
}) ];
"13" = [ (fetchpatch {
name = "gcc-13-darwin-aarch64-support.patch";
url = "https://raw.githubusercontent.com/Homebrew/formula-patches/3c5cbc8e9cf444a1967786af48e430588e1eb481/gcc/gcc-13.2.0.diff";