diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-01-23 20:35:10 -0800 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2023-02-12 07:40:05 -0800 |
commit | b83f032ffcbc6b1b9f412d50b7a6ba3cfe471d0a (patch) | |
tree | 77783e346f31ef360926b4a4cc398e715fc9e275 /pkgs/development/compilers/gcc/11/default.nix | |
parent | d381e51fb567e23039f17fdf28576dd6b341911d (diff) | |
download | nixpkgs-b83f032ffcbc6b1b9f412d50b7a6ba3cfe471d0a.tar nixpkgs-b83f032ffcbc6b1b9f412d50b7a6ba3cfe471d0a.tar.gz nixpkgs-b83f032ffcbc6b1b9f412d50b7a6ba3cfe471d0a.tar.bz2 nixpkgs-b83f032ffcbc6b1b9f412d50b7a6ba3cfe471d0a.tar.lz nixpkgs-b83f032ffcbc6b1b9f412d50b7a6ba3cfe471d0a.tar.xz nixpkgs-b83f032ffcbc6b1b9f412d50b7a6ba3cfe471d0a.tar.zst nixpkgs-b83f032ffcbc6b1b9f412d50b7a6ba3cfe471d0a.zip |
gcc/11: apply upstream fix 103910 so openjdk builds
Our openjdk derivations fail to build with `-march=opteron` (via either `NIX_CFLAGS_COMPILE` or `hostPlatform.gcc.arch`). This was fixed upstream in gcc12 but not carried back to gcc11: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=d243f4009d8071b734df16cd70f4c5d09a373769 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103910 Since gcc11 is still nixpkgs' primary compiler, this PR cherry-picks the fix out of gcc12. Unfortunately since `-march=` can be added after the `gcc11` derivation is built we can't apply this patch conditionally (which we don't usually do anyways).
Diffstat (limited to 'pkgs/development/compilers/gcc/11/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/11/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index e4dab5f263d..7b8b5af477e 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -82,7 +82,10 @@ let majorVersion = "11"; ++ optional (stdenv.isDarwin && targetPlatform.isAvr) ./avr-gcc-11.3-darwin.patch # Obtain latest patch with ../update-mcfgthread-patches.sh - ++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch; + ++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch + + # openjdk build fails without this on -march=opteron; is upstream in gcc12 + ++ [ ./gcc-issue-103910.patch ]; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; |