From ba686313d496ee25db69803ef7e5bfb1e07eb841 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 6 Oct 2006 12:27:58 +0900 Subject: build-cpp-and-ld-flags [BUILD] CPPFLAGS, CFLAGS and LDFLAGS fixes * Set internal CPPFLAGS as EXTRA_CPPFLAGS, CFLAGS as EXTRA_CFLAGS, and LDFLAGS as EXTRA_LDFLAGS - Don't overwrite CPPFLAGS, LDLFAGS or CFLAGS from the environment - They are irrelevant for BUILD_CC - When cross-compiling for a ppc64 host on a non-ppc64 host, EXTRA_CFLAGS, which is included in BUILD_CPPFLAGS contains -mcall-aixdesc, which does not work on i386 at least * Use LDFLAGS when linking kexec - Append rather than overwrite in purgatory/Makefile The purpose of these changes is three-fold. * CPPFLAGS, CFLAGS and LDFLAGS from the environment really ought to be honoured. For one thing; * Without these changes, the confgiure taget in the toplevel makefile can't work * Without these changes, cross compiling does not work - well, I can't work out how to get it to work anyway. Signed-Off-By: Simon Horman --- kdump/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kdump') diff --git a/kdump/Makefile b/kdump/Makefile index af33dc3..456c2fc 100644 --- a/kdump/Makefile +++ b/kdump/Makefile @@ -16,15 +16,15 @@ include $(KDUMP_DEPS) $(KDUMP_C_DEPS): $(OBJDIR)/%.d: %.c mkdir -p $(@D) - $(CC) $(CFLAGS) -M $< | sed -e 's|$(patsubst %.d,%.o,$(@F))|$(patsubst %.d,%.o,$(@))|' > $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -M $< | sed -e 's|$(patsubst %.d,%.o,$(@F))|$(patsubst %.d,%.o,$(@))|' > $@ $(KDUMP_C_OBJS): $(OBJDIR)/%.o: %.c $(OBJDIR)/%.d mkdir -p $(@D) - $(CC) $(CFLAGS) -o $@ -c $< + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $< $(KDUMP): $(KDUMP_OBJS) mkdir -p $(@D) - $(CC) $(CFLAGS) -o $@ $(KDUMP_OBJS) + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $(KDUMP_OBJS) $(KDUMP_MANPAGE): kdump/kdump.8 $(MKDIR) -p $(MANDIR)/man8 -- cgit