summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.com>2015-07-16 18:23:53 +0200
committerMichal Marek <mmarek@suse.com>2015-07-22 17:44:04 +0200
commit6dd3f13e4239a8c2b1e60687d7321bc0df614f33 (patch)
tree7d148e25d689adf8f5633fc7f73a2c565cc0f915 /Makefile
parentd770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff)
kbuild: Do not pick up ARCH_{CPP,A,C}FLAGS from the environment
Initialize the ARCH_* overrides before including the arch Makefile, to avoid picking up the values from the environment. The variables can still be overriden on the make command line, but this won't happen by accident. Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 13270c0a9336..dc868bcdaf45 100644
--- a/Makefile
+++ b/Makefile
@@ -597,6 +597,11 @@ endif # $(dot-config)
# Defaults to vmlinux, but the arch makefile usually adds further targets
all: vmlinux
+# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
+# values of the respective KBUILD_* variables
+ARCH_CPPFLAGS :=
+ARCH_AFLAGS :=
+ARCH_CFLAGS :=
include arch/$(SRCARCH)/Makefile
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)