From 24dfab68d8810bbbc19215d6126079fe0a8aa7eb Mon Sep 17 00:00:00 2001 From: ajs124 Date: Thu, 7 Apr 2022 11:34:04 +0100 Subject: [PATCH] gcc: upgrade aarch64-linux default from 9 to 11 --- pkgs/development/compilers/gcc/builder.sh | 10 ++++++++++ pkgs/top-level/all-packages.nix | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 9d0514f175901..2d65708e430fa 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -222,6 +222,16 @@ postInstall() { moveToOutput "${targetConfig+$targetConfig/}lib/lib*.dll.a" "${!outputLib}" moveToOutput "share/gcc-*/python" "${!outputLib}" + # based on https://src.fedoraproject.org/rpms/gcc/blob/95507e8b681b5013b87bbbcb0514dd27941e648a/f/gcc.spec#_1293 + # if [ ! -z $REPLACE_LINKER_SCRIPT ]; then + rm -f "${!outputLib}/lib/libgcc_s.so" + echo '/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') + GROUP ( libgcc_s.so.1 libgcc.a )' > "${!outputLib}/lib/libgcc_s.so" + # fi + if [ -z "$enableShared" ]; then moveToOutput "${targetConfig+$targetConfig/}lib/lib*.a" "${!outputLib}" fi diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4decb521a2a01..a67c541cb6011 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12164,8 +12164,7 @@ with pkgs; num = if (with stdenv.targetPlatform; isVc4 || libc == "relibc") then 6 else if (stdenv.targetPlatform.isAarch64 && stdenv.isDarwin) then 11 - else if (stdenv.targetPlatform.isx86_64 && stdenv.isLinux) then 11 - else if stdenv.targetPlatform.isAarch64 then 9 + else if ((stdenv.targetPlatform.isAarch64 || stdenv.targetPlatform.isx86_64) && stdenv.isLinux) then 11 else 10; numS = toString num; in {