pkgsMusl.gccgo: fix build
This commit is contained in:
parent
4f463decc8
commit
0319a561ec
@ -16,6 +16,7 @@
|
||||
, gmp, mpfr, libmpc, gettext, which, patchelf
|
||||
, isl ? null # optional, for the Graphite optimization framework.
|
||||
, zlib ? null
|
||||
, libucontext ? null
|
||||
, gnatboot ? null
|
||||
, enableMultilib ? false
|
||||
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
|
||||
@ -70,6 +71,44 @@ let majorVersion = "12";
|
||||
})
|
||||
++ optional langD ../libphobos.patch
|
||||
|
||||
# backport fixes to build gccgo with musl libc
|
||||
++ optionals (langGo && stdenv.hostPlatform.isMusl) [
|
||||
(fetchpatch {
|
||||
excludes = [ "gcc/go/gofrontend/MERGE" ];
|
||||
url = "https://github.com/gcc-mirror/gcc/commit/cf79b1117bd177d3d4c6ed24b6fa243c3628ac2d.diff";
|
||||
hash = "sha256-mS5ZiYi5D8CpGXrWg3tXlbhp4o86ew1imCTwaHLfl+I=";
|
||||
})
|
||||
(fetchpatch {
|
||||
excludes = [ "gcc/go/gofrontend/MERGE" ];
|
||||
url = "https://github.com/gcc-mirror/gcc/commit/7f195a2270910a6ed08bd76e3a16b0a6503f9faf.diff";
|
||||
hash = "sha256-Ze/cFM0dQofKH00PWPDoklXUlwWhwA1nyTuiDAZ6FKo=";
|
||||
})
|
||||
(fetchpatch {
|
||||
excludes = [ "gcc/go/gofrontend/MERGE" ];
|
||||
url = "https://github.com/gcc-mirror/gcc/commit/762fd5e5547e464e25b4bee435db6df4eda0de90.diff";
|
||||
hash = "sha256-o28upwTcHAnHG2Iq0OewzwSBEhHs+XpBGdIfZdT81pk=";
|
||||
})
|
||||
(fetchpatch {
|
||||
excludes = [ "gcc/go/gofrontend/MERGE" ];
|
||||
url = "https://github.com/gcc-mirror/gcc/commit/e73d9fcafbd07bc3714fbaf8a82db71d50015c92.diff";
|
||||
hash = "sha256-1SjYCVHLEUihdON2TOC3Z2ufM+jf2vH0LvYtZL+c1Fo=";
|
||||
})
|
||||
(fetchpatch {
|
||||
excludes = [ "gcc/go/gofrontend/MERGE" ];
|
||||
url = "https://github.com/gcc-mirror/gcc/commit/b6c6a3d64f2e4e9347733290aca3c75898c44b2e.diff";
|
||||
hash = "sha256-RycJ3YCHd3MXtYFjxP0zY2Wuw7/C4bWoBAQtTKJZPOQ=";
|
||||
})
|
||||
(fetchpatch {
|
||||
excludes = [ "gcc/go/gofrontend/MERGE" ];
|
||||
url = "https://github.com/gcc-mirror/gcc/commit/2b1a604a9b28fbf4f382060bebd04adb83acc2f9.diff";
|
||||
hash = "sha256-WiBQG0Xbk75rHk+AMDvsbrm+dc7lDH0EONJXSdEeMGE=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gcc-mirror/gcc/commit/c86b726c048eddc1be320c0bf64a897658bee13d.diff";
|
||||
hash = "sha256-QSIlqDB6JRQhbj/c3ejlmbfWz9l9FurdSWxpwDebnlI=";
|
||||
})
|
||||
]
|
||||
|
||||
# Obtain latest patch with ../update-mcfgthread-patches.sh
|
||||
++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch;
|
||||
|
||||
@ -178,6 +217,7 @@ stdenv.mkDerivation ({
|
||||
targetPackages.stdenv.cc.bintools # For linking code at run-time
|
||||
] ++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optional (langGo && stdenv.hostPlatform.isMusl) libucontext)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;
|
||||
|
@ -14491,7 +14491,7 @@ with pkgs;
|
||||
|
||||
gnu-smalltalk = callPackage ../development/compilers/gnu-smalltalk { };
|
||||
|
||||
gccgo = wrapCC (gcc.cc.override {
|
||||
gccgo = wrapCC ((if stdenv.hostPlatform.isMusl then gcc_latest else gcc).cc.override {
|
||||
name = "gccgo";
|
||||
langCC = true; #required for go.
|
||||
langC = true;
|
||||
|
Loading…
Reference in New Issue
Block a user