diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2015-06-18 04:24:01 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-07-06 01:39:00 -0400 |
commit | 97709069214eb75312c14946803b9da4d3814203 (patch) | |
tree | 87cf225fae4cec9ed301300ab71f34fe70d9d453 /arch/arc/Makefile | |
parent | 61754c18752ffb78145671e94f053fb202fff041 (diff) |
ARC: Override toplevel default -O2 with -O3
ARC kernels have historically been built with -O3, despite top level
Makefile defaulting to -O2. This was facilitated by implicitly ordering
of arch makefile include AFTER top level assigned -O2.
An upstream fix to top level a1c48bb160f ("Makefile: Fix unrecognized
cross-compiler command line options") changed the ordering, making ARC
-O3 defunct.
Fix that by NOT relying on any ordering whatsoever and use the proper
arch override facility now present in kbuild (ARCH_*FLAGS)
Depends-on: ("kbuild: Allow arch Makefiles to override {cpp,ld,c}flags")
Suggested-by: Michal Marek <mmarek@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/Makefile')
-rw-r--r-- | arch/arc/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arc/Makefile b/arch/arc/Makefile index 6107062c0111..46d87310220d 100644 --- a/arch/arc/Makefile +++ b/arch/arc/Makefile | |||
@@ -49,7 +49,8 @@ endif | |||
49 | 49 | ||
50 | ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE | 50 | ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE |
51 | # Generic build system uses -O2, we want -O3 | 51 | # Generic build system uses -O2, we want -O3 |
52 | cflags-y += -O3 | 52 | # Note: No need to add to cflags-y as that happens anyways |
53 | ARCH_CFLAGS += -O3 | ||
53 | endif | 54 | endif |
54 | 55 | ||
55 | # small data is default for elf32 tool-chain. If not usable, disable it | 56 | # small data is default for elf32 tool-chain. If not usable, disable it |