Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 6f95d707544ab3417673990e6a78b27b79737856 1 parent 3c5bb06
Jamey Sharp authored horms committed
View
1  Makefile.in
@@ -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
2  configure.ac
@@ -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
1  kdump/Makefile
@@ -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
4 kexec_test/Makefile
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.