gcc6, gcc7, gcc8, gcc9, gcc10, gcc11: do not modify code in prePatch
Doing any modifications before patching risks invalidating patch base.
This commit is contained in:
parent
68e3ba2b1d
commit
99d0c004d1
@ -103,9 +103,15 @@ stdenv.mkDerivation ({
|
||||
|
||||
hardeningDisable = [ "format" "pie" ];
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
''
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
+ lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
@ -114,14 +120,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
substituteInPlace libgfortran/configure \
|
||||
--replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
'' + (
|
||||
''
|
||||
+ (
|
||||
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
|
@ -103,9 +103,15 @@ stdenv.mkDerivation ({
|
||||
|
||||
hardeningDisable = [ "format" "pie" ];
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
''
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
+ lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
@ -114,14 +120,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
substituteInPlace libgfortran/configure \
|
||||
--replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
'' + (
|
||||
''
|
||||
+ (
|
||||
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
|
@ -154,7 +154,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
hardeningDisable = [ "format" "pie" ];
|
||||
|
||||
prePatch =
|
||||
postPatch =
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
lib.optionalString hostPlatform.isDarwin ''
|
||||
@ -166,9 +166,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
substituteInPlace libgfortran/configure \
|
||||
--replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
|
||||
'';
|
||||
|
||||
postPatch =
|
||||
''
|
||||
+ (
|
||||
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
@ -191,7 +190,7 @@ stdenv.mkDerivation ({
|
||||
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||
''
|
||||
)
|
||||
else null;
|
||||
else "");
|
||||
|
||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
||||
libcCross crossMingw;
|
||||
|
@ -114,9 +114,15 @@ stdenv.mkDerivation ({
|
||||
|
||||
hardeningDisable = [ "format" "pie" ];
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
''
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
+ lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
@ -125,14 +131,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
substituteInPlace libgfortran/configure \
|
||||
--replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
'' + (
|
||||
''
|
||||
+ (
|
||||
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
|
@ -101,9 +101,15 @@ stdenv.mkDerivation ({
|
||||
|
||||
hardeningDisable = [ "format" "pie" ];
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
''
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
+ lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
@ -112,14 +118,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
substituteInPlace libgfortran/configure \
|
||||
--replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
'' + (
|
||||
''
|
||||
+ (
|
||||
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
|
@ -117,9 +117,15 @@ stdenv.mkDerivation ({
|
||||
|
||||
hardeningDisable = [ "format" "pie" ];
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
''
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
+ lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
@ -128,14 +134,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
substituteInPlace libgfortran/configure \
|
||||
--replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
configureScripts=$(find . -name configure)
|
||||
for configureScript in $configureScripts; do
|
||||
patchShebangs $configureScript
|
||||
done
|
||||
'' + (
|
||||
''
|
||||
+ (
|
||||
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
|
Loading…
Reference in New Issue
Block a user