diff options
author | Gaelan Steele <gbs@canishe.com> | 2020-05-26 03:16:03 -0700 |
---|---|---|
committer | Gaelan Steele <gbs@canishe.com> | 2020-05-26 03:16:03 -0700 |
commit | 459c60dda2406d2207d2afd90f210ffc87efde54 (patch) | |
tree | 5c89a2b7715eaf25309a751415ae91b42c17cb54 /pkgs/development/compilers/gcc/6 | |
parent | b0b0a06788d5a7b3a3b35063b058f1326f10e983 (diff) | |
download | nixpkgs-459c60dda2406d2207d2afd90f210ffc87efde54.tar nixpkgs-459c60dda2406d2207d2afd90f210ffc87efde54.tar.gz nixpkgs-459c60dda2406d2207d2afd90f210ffc87efde54.tar.bz2 nixpkgs-459c60dda2406d2207d2afd90f210ffc87efde54.tar.lz nixpkgs-459c60dda2406d2207d2afd90f210ffc87efde54.tar.xz nixpkgs-459c60dda2406d2207d2afd90f210ffc87efde54.tar.zst nixpkgs-459c60dda2406d2207d2afd90f210ffc87efde54.zip |
gcc: fix building darwin->linux cross compiler
This reverts d9feea5 with some slight modifications to work with other changes since then. Fixes #88213.
Diffstat (limited to 'pkgs/development/compilers/gcc/6')
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index b1a981cfdf7..9772c9aa33a 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -11,7 +11,7 @@ , texinfo ? null , flex , perl ? null # optional, for texi2pod (then pod2man); required for Java -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , isl ? null # optional, for the Graphite optimization framework. , zlib ? null, boehmgc ? null @@ -184,11 +184,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf |