gcc: create dummy crtstuff on S390 as well

This commit replicates the fix in
https://github.com/NixOS/nixpkgs/pull/258032 for S390 as well.

Co-authored-by: Artturi <Artturin@artturin.com>

authored by Adam Joseph Artturi and committed by Adam Joseph 425cac96 a3ba0495

+5 -3
+4 -3
pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix
··· 42 # 43 # No rule to make target '../../../gcc-xx.x.x/libgcc/config/loongarch/crti.S', needed by 'crti.o'. Stop. 44 # 45 - # For LoongArch64, a hacky workaround is to simply touch them, 46 # as the platform forces .init_array support. 47 # 48 # https://www.openwall.com/lists/musl/2022/11/09/3 49 # 50 - + lib.optionalString stdenv.targetPlatform.isLoongArch64 '' 51 - touch libgcc/config/loongarch/crt{i,n}.S 52 ''
··· 42 # 43 # No rule to make target '../../../gcc-xx.x.x/libgcc/config/loongarch/crti.S', needed by 'crti.o'. Stop. 44 # 45 + # For LoongArch64 and S390, a hacky workaround is to simply touch them, 46 # as the platform forces .init_array support. 47 # 48 # https://www.openwall.com/lists/musl/2022/11/09/3 49 # 50 + # 'parsed.cpu.family' won't be correct for every platform. 51 + + lib.optionalString (stdenv.targetPlatform.isLoongArch64 || stdenv.targetPlatform.isS390) '' 52 + touch libgcc/config/${stdenv.targetPlatform.parsed.cpu.family}/crt{i,n}.S 53 ''
+1
pkgs/test/cross/default.nix
··· 141 pkgs.pkgsCross.m68k.stdenv 142 pkgs.pkgsCross.aarch64-multiplatform.pkgsBuildTarget.gcc 143 pkgs.pkgsCross.powernv.pkgsBuildTarget.gcc 144 pkgs.pkgsCross.mips64el-linux-gnuabi64.stdenv 145 pkgs.pkgsCross.mips64el-linux-gnuabin32.stdenv 146 pkgs.pkgsCross.mingwW64.stdenv
··· 141 pkgs.pkgsCross.m68k.stdenv 142 pkgs.pkgsCross.aarch64-multiplatform.pkgsBuildTarget.gcc 143 pkgs.pkgsCross.powernv.pkgsBuildTarget.gcc 144 + pkgs.pkgsCross.s390.stdenv 145 pkgs.pkgsCross.mips64el-linux-gnuabi64.stdenv 146 pkgs.pkgsCross.mips64el-linux-gnuabin32.stdenv 147 pkgs.pkgsCross.mingwW64.stdenv