build: Disable gcc's use-linker-plugin option
On GCC v6 the -fwhole-program option does not take effect when -fuse-linker-plugin is also in effect. The -fuse-linker-plugin option does not optimize as well as -fwhole-program, so explicitly disable the linker plugin via -fno-use-linker-plugin. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
9894348e12
commit
4e8674d5df
4
Makefile
4
Makefile
|
@ -35,9 +35,9 @@ cc-option=$(shell if test -z "`$(1) $(2) -S -o /dev/null -xc /dev/null 2>&1`" \
|
|||
CFLAGS-y := -I$(OUT) -Isrc -I$(OUT)board-generic/ -O2 -MD -g \
|
||||
-Wall -Wold-style-definition $(call cc-option,$(CC),-Wtype-limits,) \
|
||||
-ffunction-sections -fdata-sections
|
||||
CFLAGS-y += -flto -fwhole-program
|
||||
CFLAGS-y += -flto -fwhole-program -fno-use-linker-plugin
|
||||
|
||||
LDFLAGS-y := -Wl,--gc-sections
|
||||
LDFLAGS-y := -Wl,--gc-sections -fno-whole-program
|
||||
|
||||
CPPFLAGS = -I$(OUT) -P -MD -MT $@
|
||||
|
||||
|
|
Loading…
Reference in New Issue