From c5ab2bfd258501cbe5f440089039aff8e7595e3c Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 27 Feb 2014 18:28:32 +0100 Subject: [PATCH] gcc-cross-wrapper: Explicitly add LD program name. This is because autoconf is passing -print-prog-name=ld to the cross-gcc, which in turn assumes a FHS compliant filesystem hierarchy and searches ../../../../$crossConfig/bin/ld for the correct ld. Of course, this won't work on Nix, hence we're explicitly passing the correct LD program name. Signed-off-by: aszlig --- pkgs/build-support/gcc-cross-wrapper/setup-hook.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh index 433d36ced434..497047a73b10 100644 --- a/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh +++ b/pkgs/build-support/gcc-cross-wrapper/setup-hook.sh @@ -70,6 +70,8 @@ fi if test "$dontSetConfigureCross" != "1"; then configureFlags="$configureFlags --build=$system --host=$crossConfig" + # This is because -print-prog-name tries to search FHS paths. + configureFlags="$configureFlags LD=$crossConfig-ld" fi # Disabling the tests when cross compiling, as usually the tests are meant for # native compilations.