[Skiboot] [PATCH] Makefile: Move -m options from CPPFLAGS to CFLAGS & AFLAGS

Jeremy Kerr jeremy.kerr at au.ibm.com
Tue Jan 27 18:27:30 AEDT 2015


The -m options are for the compiler, not the preprocessor. Since we may
execute CC without CPPFLAGS, move these options to CFLAGS & AFLAGS.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>

---
 Makefile.main |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.main b/Makefile.main
index d545458..89cc751 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -44,13 +44,13 @@ CPPFLAGS += -I$(SRC)/libpore -D__HAVE_LIBPORE__
 endif
 CPPFLAGS += -D__SKIBOOT__ -nostdinc
 CPPFLAGS += -isystem $(shell $(CC) -print-file-name=include)
-CPPFLAGS += -DBITS_PER_LONG=64 -m64 -mbig-endian -DHAVE_BIG_ENDIAN
+CPPFLAGS += -DBITS_PER_LONG=64 -DHAVE_BIG_ENDIAN
 # We might want to remove our copy of stdint.h
 # but that means uint64_t becomes an ulong instead of an ullong
 # causing all our printf's to warn
 CPPFLAGS += -ffreestanding
 
-CFLAGS := -fno-strict-aliasing -fstack-protector-all -pie
+CFLAGS := -fno-strict-aliasing -fstack-protector-all -pie -mbig-endian -m64
 
 ifeq ($(STACK_CHECK),1)
 CFLAGS += -fstack-protector-all -pg
@@ -69,7 +69,7 @@ LDRFLAGS=-melf64ppc
 # Debug stuff
 #LDFLAGS += -Wl,-v -Wl,-Map,foomap 
 
-AFLAGS := -D__ASSEMBLY__ 
+AFLAGS := -D__ASSEMBLY__ -mbig-endian -m64
 
 # Special tool flags:
 # Do not use the floating point unit


More information about the Skiboot mailing list