lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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
```

authored by

Sergei Trofimovich and committed by
Adam Joseph
d0fe73a2 b0fb3f62

+6 -1
+5
pkgs/development/compilers/gcc/common/configure-flags.nix
··· 249 249 ++ lib.optionals (targetPlatform.isMips && targetPlatform.parsed.abi.name == "gnu" && lib.versions.major version == "12") [ 250 250 "--disable-libsanitizer" 251 251 ] 252 + ++ lib.optionals targetPlatform.isAlpha [ 253 + # Workaround build failures like: 254 + # cc1: error: fp software completion requires '-mtrap-precision=i' [-Werror] 255 + "--disable-werror" 256 + ] 252 257 ; 253 258 254 259 in configureFlags
+1 -1
pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix
··· 48 48 # https://www.openwall.com/lists/musl/2022/11/09/3 49 49 # 50 50 # 'parsed.cpu.family' won't be correct for every platform. 51 - + lib.optionalString (stdenv.targetPlatform.isLoongArch64 || stdenv.targetPlatform.isS390) '' 51 + + lib.optionalString (stdenv.targetPlatform.isLoongArch64 || stdenv.targetPlatform.isS390 || stdenv.targetPlatform.isAlpha) '' 52 52 touch libgcc/config/${stdenv.targetPlatform.parsed.cpu.family}/crt{i,n}.S 53 53 ''