gcc: fix gcc8 for cross-compiled targets

Adds EXTRA_TARGET_FLAGS missing from 412093994b9a4fe0fa7da99d1947effc85d9070b.

Fixes #58164
This commit is contained in:
arcnmx 2019-03-25 17:57:30 -07:00
parent d0a0de2c44
commit 05b0411c57

View File

@ -322,6 +322,13 @@ stdenv.mkDerivation ({
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib));
EXTRA_TARGET_FLAGS = optionals
(targetPlatform != hostPlatform && libcCross != null)
([
"-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}"
] ++ optionals (! crossStageStatic) [
"-B${libcCross.out}${libcCross.libdir or "/lib"}"
]);
EXTRA_TARGET_LDFLAGS = optionals
(targetPlatform != hostPlatform && libcCross != null)