]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
6742e0d2563d98d946f20f04bc7e3bcf65deb4c5
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 5d6fa06b3104637289178a471dd28d7bf3e14e76 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Tue, 3 Jan 2023 11:00:09 -0800
4 Subject: [PATCH] Pass LD_GOLD=1 via makefile to enable gold linker
5
6 Current logic prefers gold if a toolchain has gold linker installed and
7 does not offer any option to chose default linker which might not be
8 gold linker. Its better to pass this control to user instead of auto
9 detecting and deciding.
10
11 Upstream-Status: Submitted [https://github.com/ColinIanKing/stress-ng/pull/251]
12 Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14 ---
15 Makefile | 7 +++++++
16 1 file changed, 7 insertions(+)
17
18 diff --git a/Makefile b/Makefile
19 index 7a969aba..583ae04f 100644
20 --- a/Makefile
21 +++ b/Makefile
22 @@ -93,6 +93,13 @@ endif
23 #CFLAGS += -Weverything
24 #endif
25
26 +#
27 +# Use gold linker
28 +#
29 +ifeq ($(LD_GOLD),1)
30 +LDFLAGS += -fuse-ld=gold
31 +endif
32 +
33 GREP = grep
34 #
35 # SunOS requires special grep for -e support