From a5d064826b4c1fae4beda19beadc953aaed8a246 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 16 Mar 2018 16:47:24 -0400 Subject: [PATCH] gcc: Try to fix /bin/sh dependency --- pkgs/development/compilers/gcc/7/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 0462231b064e..0b19aa95effe 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -214,7 +214,12 @@ stdenv.mkDerivation ({ --replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname" ''; - postPatch = + postPatch = '' + configureScripts=$(find . -name configure) + for configureScript in $configureScripts; do + patchShebangs $configureScript + done + '' + ( if (hostPlatform.isHurd || (libcCross != null # e.g., building `gcc.crossDrv' && libcCross ? crossConfig @@ -273,7 +278,7 @@ stdenv.mkDerivation ({ sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' '' ) - else null; + else ""); # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;