Fix build without cross compilation
Bernhard Walle
bwalle at suse.de
Sun May 25 09:46:52 EDT 2008
This patch fixes build on "normal" Linux hosts without cross compiler.
The regression was introduced with
commit 6f95d707544ab3417673990e6a78b27b79737856
Author: Jamey Sharp <jamey at thetovacompany.com>
Date: Thu May 15 17:03:09 2008 -0700
Use target CC and LD to build kdump and kexec_test.
Signed-off-by: Jamey Sharp <jamey at thetovacompany.com>
Signed-off-by: Simon Horman <horms at verge.net.au>
Signed-off-by: Bernhard Walle <bwalle at suse.de>
---
configure.ac | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index beb8b3e..36436ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,21 +84,22 @@ else
BUILD_CC="$CC"
fi
+dnl Find the compiler tool chain
+AC_PROG_CPP
+AC_CHECK_TOOL([LD], ld, "no", $PATH)
+AC_CHECK_TOOL([AS], as, "no", $PATH)
+AC_CHECK_TOOL([OBJCOPY], objcopy, "no", $PATH)
+AC_CHECK_TOOL([AR], ar, "", $PATH)
+
dnl Find compiler for target
if test "${target}" != "${host}" ; then
AC_CHECK_PROGS(TARGET_CC, [${target_alias}-gcc ${target}-gcc
gcc]) AC_CHECK_PROGS(TARGET_LD, [${target_alias}-ld ${target}-ld ld])
else
TARGET_CC="$CC"
+ TARGET_LD="$LD"
fi
-dnl Find the compiler tool chain
-AC_PROG_CPP
-AC_CHECK_TOOL([LD], ld, "no", $PATH)
-AC_CHECK_TOOL([AS], as, "no", $PATH)
-AC_CHECK_TOOL([OBJCOPY], objcopy, "no", $PATH)
-AC_CHECK_TOOL([AR], ar, "", $PATH)
-
dnl Find the helper functions
AC_PROG_INSTALL
AC_CHECK_PROG([MKDIR], mkdir, mkdir, "no", [$PATH])
More information about the kexec
mailing list