about summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-03-16 16:47:24 -0400
committerShea Levy <shea@shealevy.com>2018-03-17 21:58:15 -0400
commita5d064826b4c1fae4beda19beadc953aaed8a246 (patch)
treecf3e1ebe8edc16be364292af1f0129d54f4fe7b7 /pkgs/development/compilers/gcc
parent86972b23218d92cac5d539aa3b27bd550910f3d3 (diff)
downloadnixlib-a5d064826b4c1fae4beda19beadc953aaed8a246.tar
nixlib-a5d064826b4c1fae4beda19beadc953aaed8a246.tar.gz
nixlib-a5d064826b4c1fae4beda19beadc953aaed8a246.tar.bz2
nixlib-a5d064826b4c1fae4beda19beadc953aaed8a246.tar.lz
nixlib-a5d064826b4c1fae4beda19beadc953aaed8a246.tar.xz
nixlib-a5d064826b4c1fae4beda19beadc953aaed8a246.tar.zst
nixlib-a5d064826b4c1fae4beda19beadc953aaed8a246.zip
gcc: Try to fix /bin/sh dependency
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r--pkgs/development/compilers/gcc/7/default.nix9
1 files 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;