From f146a3c31661e6ed9d4b964d7dd00e7838133d2f Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sun, 7 Jan 2018 18:02:57 -0600 Subject: gcc5, 7: same fixes as gcc6 --- pkgs/development/compilers/gcc/7/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkgs/development/compilers/gcc/7') diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 73768d651044..3f6aeeeabcd0 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -254,16 +254,22 @@ stdenv.mkDerivation ({ let libc = if libcCross != null then libcCross else stdenv.cc.libc; in + ( '' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h do - grep -q LIBC_DYNAMIC_LINKER "$header" || continue + grep -q _DYNAMIC_LINKER "$header" || continue 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' \ -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g' done '' + + stdenv.lib.optionalString (targetPlatform.libc == "musl") + '' + sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' + '' + ) else null; # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, -- cgit 1.4.1