Skip to content

Commit

Permalink
Use target CC and LD to build kdump and kexec_test.
Browse files Browse the repository at this point in the history
Signed-off-by: Jamey Sharp <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
Jamey Sharp authored and horms committed May 21, 2008
1 parent 3c5bb06 commit 6f95d70
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@


Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])

Expand Down
1 change: 1 addition & 0 deletions kdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions kexec_test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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.