]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
kbuild: remove ARCH_{CPP,A,C}FLAGS
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 20 Aug 2019 17:09:41 +0000 (02:09 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 4 Sep 2019 01:01:17 +0000 (10:01 +0900)
These flags were added by commit 61754c18752f ("kbuild: Allow arch
Makefiles to override {cpp,ld,c}flags") to allow ARC to override -O2.

We did not see any other usage after all. Now that ARC switched to
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3, there is no more user of
these variables.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Documentation/kbuild/makefiles.rst
Makefile

index e9ffdffa3641a6983563b5b24fd634a959de2a26..6ba9d5365ff3dd6c80085da47ff3ccd9237dd40e 100644 (file)
@@ -959,13 +959,6 @@ When kbuild executes, the following steps are followed (roughly):
        $(KBUILD_ARFLAGS) set by the top level Makefile to "D" (deterministic
        mode) if this option is supported by $(AR).
 
-    ARCH_CPPFLAGS, ARCH_AFLAGS, ARCH_CFLAGS   Overrides the kbuild defaults
-
-       These variables are appended to the KBUILD_CPPFLAGS,
-       KBUILD_AFLAGS, and KBUILD_CFLAGS, respectively, after the
-       top-level Makefile has set any other flags. This provides a
-       means for an architecture to override the defaults.
-
     KBUILD_LDS
 
        The linker script with full path. Assigned by the top-level Makefile.
index c27bc98ad28bf1972e764b25a22581adf80fd12e..db5706ceecad1bf5b702bd02000188232f169b33 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -668,11 +668,6 @@ RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc
 export RETPOLINE_CFLAGS
 export RETPOLINE_VDSO_CFLAGS
 
-# 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
 
 ifdef need-config
@@ -927,11 +922,10 @@ include scripts/Makefile.kasan
 include scripts/Makefile.extrawarn
 include scripts/Makefile.ubsan
 
-# Add any arch overrides and user supplied CPPFLAGS, AFLAGS and CFLAGS as the
-# last assignments
-KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
-KBUILD_AFLAGS   += $(ARCH_AFLAGS)   $(KAFLAGS)
-KBUILD_CFLAGS   += $(ARCH_CFLAGS)   $(KCFLAGS)
+# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
+KBUILD_CPPFLAGS += $(KCPPFLAGS)
+KBUILD_AFLAGS   += $(KAFLAGS)
+KBUILD_CFLAGS   += $(KCFLAGS)
 
 KBUILD_LDFLAGS_MODULE += --build-id
 LDFLAGS_vmlinux += --build-id