diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-08-26 16:15:05 -0500 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-11-27 13:27:55 +0000 |
commit | 8bae66faa3e7ba2555d679bb368186f6d07d5cea (patch) | |
tree | 25c2bedee6b7cb4a0f28d860a2e1e818549328c3 /nixpkgs/pkgs/development/compilers/gcc/10 | |
parent | 678667b74b81f63bcb134c16a7f49877b1b15073 (diff) | |
download | nixlib-8bae66faa3e7ba2555d679bb368186f6d07d5cea.tar nixlib-8bae66faa3e7ba2555d679bb368186f6d07d5cea.tar.gz nixlib-8bae66faa3e7ba2555d679bb368186f6d07d5cea.tar.bz2 nixlib-8bae66faa3e7ba2555d679bb368186f6d07d5cea.tar.lz nixlib-8bae66faa3e7ba2555d679bb368186f6d07d5cea.tar.xz nixlib-8bae66faa3e7ba2555d679bb368186f6d07d5cea.tar.zst nixlib-8bae66faa3e7ba2555d679bb368186f6d07d5cea.zip |
gcc10: fix building darwin->linux cross compiler
same as 459c60dda2406d2207d2afd90f210ffc87efde54 but for gcc10 (cherry picked from commit 0b8312660aaa34cc87bdf5e3776bcaf4c5ba3c59)
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/gcc/10')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/gcc/10/default.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix index ae723a145313..aa34798cc589 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix @@ -11,7 +11,7 @@ , enableLTO ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) -, 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 @@ -151,11 +151,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 |