Permalink
Browse files

Use target CC and LD to build kdump and kexec_test.

Signed-off-by: Jamey Sharp <jamey@thetovacompany.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information...
1 parent 3c5bb06 commit 6f95d707544ab3417673990e6a78b27b79737856 Jamey Sharp committed with horms May 16, 2008
Showing with 6 additions and 2 deletions.
  1. +1 −0 Makefile.in
  2. +2 −0 configure.ac
  3. +1 −0 kdump/Makefile
  4. +2 −2 kexec_test/Makefile
View
@@ -37,6 +37,7 @@ AR = @AR@
BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = @BUILD_CFLAGS@
TARGET_CC = @TARGET_CC@
+TARGET_LD = @TARGET_LD@
TARGET_CFLAGS = @TARGET_CFLAGS@
View
@@ -87,6 +87,7 @@ fi
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"
fi
@@ -148,6 +149,7 @@ dnl ---Output variables...
AC_SUBST([BUILD_CC])
AC_SUBST([BUILD_CFLAGS])
AC_SUBST([TARGET_CC])
+AC_SUBST([TARGET_LD])
AC_SUBST([TARGET_CFLAGS])
AC_SUBST([ASFLAGS])
View
@@ -15,6 +15,7 @@ clean += $(KDUMP_OBJS) $(KDUMP_DEPS) $(KDUMP) $(KDUMP_MANPAGE)
-include $(KDUMP_DEPS)
+$(KDUMP): CC=$(TARGET_CC)
$(KDUMP): $(KDUMP_OBJS)
@$(MKDIR) -p $(@D)
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $(KDUMP_OBJS)
View
@@ -26,6 +26,7 @@ clean += $(KEXEC_TEST_OBJS) $(KEXEC_TEST_DEPS) $(KEXEC_TEST)
-include $(KEXEC_TEST_DEPS)
+$(KEXEC_TEST): CC=$(TARGET_CC)
$(KEXEC_TEST): CPPFLAGS+=-DRELOC=$(RELOC)
$(KEXEC_TEST): ASFLAGS+=-m32
#$(KEXEC_TEST): LDFLAGS=-m32 -Wl,-e -Wl,_start -Wl,-Ttext -Wl,$(RELOC) \
@@ -34,7 +35,6 @@ $(KEXEC_TEST): LDFLAGS=-melf_i386 -e _start -Ttext $(RELOC)
$(KEXEC_TEST): $(KEXEC_TEST_OBJS)
mkdir -p $(@D)
- #$(LINK.o) -o $@ $^
- $(LD) $(LDFLAGS) -o $@ $^
+ $(TARGET_LD) $(LDFLAGS) -o $@ $^
endif

0 comments on commit 6f95d70

Please sign in to comment.