diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 5147df1e4cc0d..75ff2a1317a64 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -185,8 +185,9 @@ preConfigure() { postConfigure() { - # Don't store the configure flags in the resulting executables. - sed -e '/TOPLEVEL_CONFIGURE_ARGUMENTS=/d' -i Makefile + # Avoid store paths when embedding ./configure flags into gcc. + # Mangled arguments are still useful when reporting bugs upstream. + sed -e "/TOPLEVEL_CONFIGURE_ARGUMENTS=/ s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i Makefile }