Skip to content

Commit c302653

Browse files
committed
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 a1c48bb ("Makefile: Fix unrecognized cross-compiler command line options") changed the ordering, making ARC -O3 defunt. Fix that by NOT relying on any ordering whatsoever and use the right mechanism to do the over-rides. Suggested-by: Michal Marek <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 35bb8dd commit c302653

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ endif
5050
ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
5151
# Generic build system uses -O2, we want -O3
5252
cflags-y += -O3
53+
KCFLAGS += -O3
5354
endif
5455

5556
# small data is default for elf32 tool-chain. If not usable, disable it

0 commit comments

Comments
 (0)