From: Andrew Cooper Date: Sat, 11 May 2019 18:21:02 +0000 (+0100) Subject: LTO: Specify the use of gold with a compiler option rather than an explicit path X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b94ab2923c2f1671b628c0210fa8ddc7abe8c617;p=people%2Fandrewcoop%2Fxen-test-framework.git LTO: Specify the use of gold with a compiler option rather than an explicit path This allows the compiler to pick up gold from the path, rather than forcing the use of the system gold all the time. Signed-off-by: Andrew Cooper --- diff --git a/build/common.mk b/build/common.mk index b786ddf..6480a54 100644 --- a/build/common.mk +++ b/build/common.mk @@ -19,7 +19,7 @@ COMMON_FLAGS := -pipe -I$(ROOT)/include -I$(ROOT)/arch/x86/include -MMD -MP # Experimental LTO support. `make ... lto=y` COMMON_CFLAGS-$(lto) := -flto -LDFLAGS-$(lto) := -flto -B /usr/lib/gold-ld +LDFLAGS-$(lto) := -flto -fuse-ld=gold COMMON_AFLAGS := $(COMMON_FLAGS) -D__ASSEMBLY__ COMMON_CFLAGS := $(COMMON_FLAGS) $(COMMON_CFLAGS-y)