From 05b0411c57c1cf3a47f8c9c36aa4e36e90215b7e Mon Sep 17 00:00:00 2001 From: arcnmx Date: Mon, 25 Mar 2019 17:57:30 -0700 Subject: [PATCH] gcc: fix gcc8 for cross-compiled targets Adds EXTRA_TARGET_FLAGS missing from 412093994b9a4fe0fa7da99d1947effc85d9070b. Fixes #58164 --- pkgs/development/compilers/gcc/8/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index ce3395f0be0..f5572c077f3 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -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)