3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #58313 from arcnmx/gcc-8-cross

gcc: fix gcc8 for cross-compiled targets
This commit is contained in:
Matthew Bauer 2019-03-25 21:57:48 -04:00 committed by GitHub
commit 38a89c8653
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)