diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/gcc/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/gcc/default.nix | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/compilers/gcc/default.nix b/nixpkgs/pkgs/development/compilers/gcc/default.nix index fdc79b575515..4544f3862fea 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/default.nix @@ -27,6 +27,7 @@ , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , buildPackages +, pkgsBuildTarget , libxcrypt , disableGdbPlugin ? !enablePlugin , nukeReferences @@ -176,6 +177,7 @@ let inherit version; nukeReferences patchelf perl + pkgsBuildTarget profiledCompiler reproducibleBuild staticCompiler @@ -309,17 +311,15 @@ lib.pipe ((callFile ./common/builder.nix {}) ({ libc = if libcCross != null then libcCross else stdenv.cc.libc; in ( - '' echo "fixing the \`GLIBC_DYNAMIC_LINKER'${lib.optionalString atLeast6 ", \\`UCLIBC_DYNAMIC_LINKER',"} and \`${if atLeast6 then "MUSL" else "UCLIBC"}_DYNAMIC_LINKER' macros..." + '' echo "fixing the {GLIBC,UCLIBC,MUSL}_DYNAMIC_LINKER macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h do grep -q ${lib.optionalString (!atLeast6) "LIBC"}_DYNAMIC_LINKER "$header" || continue - echo " fixing \`$header'..." + echo " fixing $header..." sed -i "$header" \ - -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'${lib.optionalString atLeast6 " \\"} - '' + lib.optionalString atLeast6 '' -${""} -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g' - '' + '' -${""} done + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' \ + -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g' + done '' + lib.optionalString (atLeast6 && targetPlatform.libc == "musl") '' sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' '' @@ -327,9 +327,7 @@ ${""} done )) + lib.optionalString (atLeast7 && targetPlatform.isAvr) ('' makeFlagsArray+=( - '' + (lib.optionalString atLeast10 '' '-s' # workaround for hitting hydra log limit - '') + '' 'LIMITS_H_TEST=false' ) ''); |