aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-12-22 22:48:14 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-12-22 22:48:14 -0500
commit4e8674d5df46841e68b72b83911b28ec71079bf1 (patch)
treea4757335ca4c29977c3aa6a5ea18fa6fe5139537
parent9894348e12d78b62defbbb4be606b839cfe3a818 (diff)
downloadkutter-4e8674d5df46841e68b72b83911b28ec71079bf1.tar.gz
kutter-4e8674d5df46841e68b72b83911b28ec71079bf1.tar.xz
kutter-4e8674d5df46841e68b72b83911b28ec71079bf1.zip
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>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b17cb885..b006d967 100644
--- a/Makefile
+++ b/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 $@