diff options
author | Simon Horman <horms@verge.net.au> | 2006-10-06 12:27:58 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2006-10-06 12:46:16 +0900 |
commit | ba686313d496ee25db69803ef7e5bfb1e07eb841 (patch) | |
tree | 91ba8a16a03ed3710c16a01c9cf413d57983c371 /kexec | |
parent | 103c946e39eb9dd57ccbda20ac12ccb01f883c17 (diff) |
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 <horms@verge.net.au>
Diffstat (limited to 'kexec')
-rw-r--r-- | kexec/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kexec/Makefile b/kexec/Makefile index 3d906a6..000c1bb 100644 --- a/kexec/Makefile +++ b/kexec/Makefile @@ -7,7 +7,7 @@ $(PURGATORY_HEX_C): $(PURGATORY) $(BIN_TO_HEX) $(MKDIR) -p $(@D) $(BIN_TO_HEX) purgatory < $(PURGATORY) > $@ -KCFLAGS:= $(CFLAGS) -Ikexec/arch/$(ARCH)/include +KCFLAGS:= $(CFLAGS) $(EXTRA_CFLAGS) -Ikexec/arch/$(ARCH)/include KEXEC_C_SRCS:= kexec/kexec.c KEXEC_C_SRCS+= kexec/ifdown.c @@ -68,7 +68,8 @@ $(KEXEC_S_OBJS): $(OBJDIR)/%.o: %.S $(OBJDIR)/%.d $(KEXEC): $(KEXEC_OBJS) $(UTIL_LIB) mkdir -p $(@D) - $(CC) $(KCFLAGS) -o $@ $(KEXEC_OBJS) $(UTIL_LIB) $(LIBS) + $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(KCFLAGS) -o $@ \ + $(KEXEC_OBJS) $(UTIL_LIB) $(LIBS) $(KEXEC_MANPAGE): kexec/kexec.8 $(MKDIR) -p $(MANDIR)/man8 |