diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-10-22 12:01:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 12:01:52 +0000 |
commit | 4312247c19eb3dc43cb2398553695355f7ad7a33 (patch) | |
tree | 584bd76ce12cb7bf71469447d3b0f37fefbca9ab /pkgs/development/compilers/gcc | |
parent | 9dee72ddc480579679ec19f0d80144e7bd83798f (diff) | |
parent | f55aa936856d5c469f4c1c27cadf232df81b370e (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix b/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix index e7dc570a560cb..fc88e61c6560e 100644 --- a/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix +++ b/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix @@ -31,7 +31,22 @@ let # SHLIB_LC = lib.optionalString stdenv.targetPlatform.isPower "-mnewlib"; -in '' - echo 'libgcc.a: ${crtstuff-ofiles}' >> libgcc/Makefile.in - echo 'SHLIB_LC=${SHLIB_LC}' >> libgcc/Makefile.in - '' +in +'' + echo 'libgcc.a: ${crtstuff-ofiles}' >> libgcc/Makefile.in + echo 'SHLIB_LC=${SHLIB_LC}' >> libgcc/Makefile.in +'' + + # Meanwhile, crt{i,n}.S are not present on certain platforms + # (e.g. LoongArch64), resulting in the following error: + # + # No rule to make target '../../../gcc-xx.x.x/libgcc/config/loongarch/crti.S', needed by 'crti.o'. Stop. + # + # For LoongArch64, a hacky workaround is to simply touch them, + # as the platform forces .init_array support. + # + # https://www.openwall.com/lists/musl/2022/11/09/3 + # + + lib.optionalString stdenv.targetPlatform.isLoongArch64 '' + touch libgcc/config/loongarch/crt{i,n}.S +'' |