gcc7: port darwin changes from 5.x
This commit is contained in:
parent
261cbdbe19
commit
1b89036cdf
@ -228,6 +228,19 @@ stdenv.mkDerivation ({
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
substituteInPlace libgcc/config/t-slibgcc-darwin \
|
||||
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)"
|
||||
|
||||
substituteInPlace libgfortran/configure \
|
||||
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
|
||||
'';
|
||||
|
||||
postPatch =
|
||||
if (hostPlatform.isHurd
|
||||
|| (libcCross != null # e.g., building `gcc.crossDrv'
|
||||
|
Loading…
Reference in New Issue
Block a user