forked from mirrors/nixpkgs
gcc10: fix building darwin->linux cross compiler
same as 459c60dda2
but for gcc10
This commit is contained in:
parent
872b23d214
commit
0b8312660a
|
@ -11,7 +11,7 @@
|
||||||
, enableLTO ? true
|
, enableLTO ? true
|
||||||
, texinfo ? null
|
, texinfo ? null
|
||||||
, perl ? null # optional, for texi2pod (then pod2man)
|
, 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)
|
, libelf # optional, for link-time optimizations (LTO)
|
||||||
, isl ? null # optional, for the Graphite optimization framework.
|
, isl ? null # optional, for the Graphite optimization framework.
|
||||||
, zlib ? null
|
, zlib ? null
|
||||||
|
@ -151,11 +151,14 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
# For building runtime libs
|
# For building runtime libs
|
||||||
depsBuildTarget =
|
depsBuildTarget =
|
||||||
if hostPlatform == buildPlatform then [
|
(
|
||||||
targetPackages.stdenv.cc.bintools # newly-built gcc will be used
|
if hostPlatform == buildPlatform then [
|
||||||
] else assert targetPlatform == hostPlatform; [ # build != host == target
|
targetPackages.stdenv.cc.bintools # newly-built gcc will be used
|
||||||
stdenv.cc
|
] else assert targetPlatform == hostPlatform; [ # build != host == target
|
||||||
];
|
stdenv.cc
|
||||||
|
]
|
||||||
|
)
|
||||||
|
++ optional targetPlatform.isLinux patchelf;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gmp mpfr libmpc libelf
|
gmp mpfr libmpc libelf
|
||||||
|
|
Loading…
Reference in a new issue