|
|
|
@ -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'. |
|
|
|
|