diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-12-20 11:33:55 +0000 |
---|---|---|
committer | Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> | 2024-01-18 08:30:39 +0000 |
commit | d0fe73a2d51c83ad13e379cc25e0c77eefd2a6e4 (patch) | |
tree | bb90a1425f208b43853db83a77dd6b2fb43e2c66 /pkgs/development/compilers | |
parent | b0fb3f62d04be2d827bbe21135d97ff49c47a0e4 (diff) | |
download | nixlib-d0fe73a2d51c83ad13e379cc25e0c77eefd2a6e4.tar nixlib-d0fe73a2d51c83ad13e379cc25e0c77eefd2a6e4.tar.gz nixlib-d0fe73a2d51c83ad13e379cc25e0c77eefd2a6e4.tar.bz2 nixlib-d0fe73a2d51c83ad13e379cc25e0c77eefd2a6e4.tar.lz nixlib-d0fe73a2d51c83ad13e379cc25e0c77eefd2a6e4.tar.xz nixlib-d0fe73a2d51c83ad13e379cc25e0c77eefd2a6e4.tar.zst nixlib-d0fe73a2d51c83ad13e379cc25e0c77eefd2a6e4.zip |
gcc: extend crtn workaround to alpha target
Without the change `alpha-unknown-linux-gnu` target is failing to build `gcc`: ``` $ NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix build -f ./. re2c --arg crossSystem '{ config = "alpha-unknown-linux-gnu"; }' ... make[1]: *** No rule to make target '../../../gcc-12.3.0/libgcc/config/alpha/crti.S', needed by 'crti.o'. Stop. ... cc1: error: fp software completion requires '-mtrap-precision=i' [-Werror] ``` After the change it is able to produce working binaries: ``` $ NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix build -f ./. re2c --arg crossSystem '{ config = "alpha-unknown-linux-gnu"; }' ... $ qemu-alpha ./result/bin/re2c --version re2c 3.1 $ file result/bin/re2c result/bin/re2c: ELF 64-bit LSB executable, Alpha (unofficial), version 1 (SYSV), dynamically linked, interpreter ...-glibc-alpha-unknown-linux-gnu-2.38-27/lib/ld-linux.so.2, for GNU/Linux 3.10.0, not stripped ```
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/gcc/common/configure-flags.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index cbe38f1127f3..05fd9406377d 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -249,6 +249,11 @@ let ++ lib.optionals (targetPlatform.isMips && targetPlatform.parsed.abi.name == "gnu" && lib.versions.major version == "12") [ "--disable-libsanitizer" ] + ++ lib.optionals targetPlatform.isAlpha [ + # Workaround build failures like: + # cc1: error: fp software completion requires '-mtrap-precision=i' [-Werror] + "--disable-werror" + ] ; in configureFlags diff --git a/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix b/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix index 239d60268007..991efc20eee5 100644 --- a/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix +++ b/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix @@ -48,6 +48,6 @@ in # https://www.openwall.com/lists/musl/2022/11/09/3 # # 'parsed.cpu.family' won't be correct for every platform. -+ lib.optionalString (stdenv.targetPlatform.isLoongArch64 || stdenv.targetPlatform.isS390) '' ++ lib.optionalString (stdenv.targetPlatform.isLoongArch64 || stdenv.targetPlatform.isS390 || stdenv.targetPlatform.isAlpha) '' touch libgcc/config/${stdenv.targetPlatform.parsed.cpu.family}/crt{i,n}.S '' |