summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2012-12-23 13:45:29 +0900
committerSimon Horman <horms@verge.net.au>2012-12-23 16:10:00 +0900
commit3af8bee323bfb7894e760ac32f18e3ef082b2c5b (patch)
treee304b87f9abda10485695c7ef4e961f17163f394
parent9044ac63c0b5dc5be6b651727f44c87ceccc2d63 (diff)
build: Restrict scope of per-arch compiler flags
Restrict the scope of compiler flags set in per-arch Makefiles to the architecture the Makefile belongs to. Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--Makefile.in4
-rw-r--r--kexec/arch/arm/Makefile2
-rw-r--r--kexec/arch/ppc/Makefile4
3 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 384cf0b..c1859d1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -45,10 +45,10 @@ TARGET_CFLAGS = @TARGET_CFLAGS@
# Base compiler flags. These are extended by the subcomponent-Makefiles
# where necessary.
CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -I$(srcdir)/util_lib/include \
- -Iinclude/
+ -Iinclude/ $($(ARCH)_CPPFLAGS)
CFLAGS = @CFLAGS@ -fno-strict-aliasing -Wall -Wstrict-prototypes
PURGATORY_EXTRA_CFLAGS = @PURGATORY_EXTRA_CFLAGS@
-ASFLAGS = @ASFLAGS@
+ASFLAGS = @ASFLAGS@ $($(ARCH)_ASFLAGS)
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
diff --git a/kexec/arch/arm/Makefile b/kexec/arch/arm/Makefile
index 192e6ec..682db78 100644
--- a/kexec/arch/arm/Makefile
+++ b/kexec/arch/arm/Makefile
@@ -16,7 +16,7 @@ arm_KEXEC_SRCS+= kexec/fs2dt.c
libfdt_SRCS += $(LIBFDT_SRCS:%=kexec/libfdt/%)
-CPPFLAGS+=-I$(srcdir)/kexec/libfdt
+arm_CPPFLAGS = -I$(srcdir)/kexec/libfdt
arm_KEXEC_SRCS += $(libfdt_SRCS)
diff --git a/kexec/arch/ppc/Makefile b/kexec/arch/ppc/Makefile
index 312c2b9..71871f1 100644
--- a/kexec/arch/ppc/Makefile
+++ b/kexec/arch/ppc/Makefile
@@ -20,11 +20,11 @@ ppc_libfdt_SRCS = kexec/arch/ppc/libfdt-wrapper.c
libfdt_SRCS += $(LIBFDT_SRCS:%=kexec/libfdt/%)
ppc_ARCH_REUSE_INITRD =
-CPPFLAGS+=-I$(srcdir)/kexec/libfdt
+ppc_CPPFLAGS = -I$(srcdir)/kexec/libfdt
ppc_KEXEC_SRCS += $(libfdt_SRCS) $(ppc_libfdt_SRCS)
-ASFLAGS += -Wa,--noexecstack
+ppc_ASFLAGS = -Wa,--noexecstack
dist += kexec/arch/ppc/Makefile $(ppc_KEXEC_SRCS) \
kexec/arch/ppc/crashdump-powerpc.h kexec/arch/ppc/fixup_dtb.h \