]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kbuild: Allow arch Makefiles to override {cpp,ld,c}flags
authorMichal Marek <mmarek@suse.cz>
Wed, 1 Jul 2015 15:19:30 +0000 (17:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 19:21:52 +0000 (12:21 -0700)
commit32469b1200b97621d0ec24aa0eb675264b95dc7b
treed47648c76375a6a779e93bef7b79dd972186a8ea
parenta783168dabf7c681959353b6560da3b0b1370386
kbuild: Allow arch Makefiles to override {cpp,ld,c}flags

commit 61754c18752ffb78145671e94f053fb202fff041 upstream.

Since commit a1c48bb1 (Makefile: Fix unrecognized cross-compiler command
line options), the arch Makefile is included earlier by the main
Makefile, preventing the arc architecture to set its -O3 compiler
option. Since there might be more use cases for an arch Makefile to
fine-tune the options, add support for ARCH_CPPFLAGS, ARCH_AFLAGS and
ARCH_CFLAGS variables that are appended to the respective kbuild
variables. The user still has the final say via the KCPPFLAGS, KAFLAGS
and KCFLAGS variables.

Reported-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/kbuild/makefiles.txt
Makefile