diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-01-03 12:05:50 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-06 12:03:47 +0000 |
| commit | 3f833254a433c648f217184a1d2b0f2d86d2426d (patch) | |
| tree | 7cd82041d2b42da8363cdac602078737c54ac65b /meta/recipes-extended | |
| parent | a50bad0c5880ffee85a1a7200789a5ee57dc82e0 (diff) | |
| download | poky-3f833254a433c648f217184a1d2b0f2d86d2426d.tar.gz | |
stress-ng: Do not enforce gold linker
This can then be controlled by yocto environment through LDFLAGS if
needed since we support multiple linkers and distro policy may want a
different linker, moreover gold fails on ppc32 to link since its missing
Fixes errors like below on ppc/gold + clang
/usr/lib/clang/15.0.6/lib/linux/libclang_rt.builtins-powerpc.a(mulsc3.c.o): unsupported -mbss-plt code
(From OE-Core rev: 089cc4b036e370bf82973ca6ced038578e4682cf)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
| -rw-r--r-- | meta/recipes-extended/stress-ng/stress-ng/0001-Pass-LD_GOLD-1-via-makefile-to-enable-gold-linker.patch | 65 | ||||
| -rw-r--r-- | meta/recipes-extended/stress-ng/stress-ng_0.15.01.bb | 3 |
2 files changed, 67 insertions, 1 deletions
diff --git a/meta/recipes-extended/stress-ng/stress-ng/0001-Pass-LD_GOLD-1-via-makefile-to-enable-gold-linker.patch b/meta/recipes-extended/stress-ng/stress-ng/0001-Pass-LD_GOLD-1-via-makefile-to-enable-gold-linker.patch new file mode 100644 index 0000000000..821e4d910f --- /dev/null +++ b/meta/recipes-extended/stress-ng/stress-ng/0001-Pass-LD_GOLD-1-via-makefile-to-enable-gold-linker.patch | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | From 32386c13420f676bd938a8b1ceaeab8a5da46d17 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 | Makefile | 7 +++++++ | ||
| 15 | Makefile.config | 9 +-------- | ||
| 16 | 2 files changed, 8 insertions(+), 8 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/Makefile b/Makefile | ||
| 19 | index f2fd4b6c..bff6b8ac 100644 | ||
| 20 | --- a/Makefile | ||
| 21 | +++ b/Makefile | ||
| 22 | @@ -69,6 +69,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 | ||
| 36 | diff --git a/Makefile.config b/Makefile.config | ||
| 37 | index 394ed20d..48c94fa1 100644 | ||
| 38 | --- a/Makefile.config | ||
| 39 | +++ b/Makefile.config | ||
| 40 | @@ -241,7 +241,7 @@ define check_ld | ||
| 41 | $(call check_ld_tmp,$1,$2,$3) | ||
| 42 | endef | ||
| 43 | |||
| 44 | -all: linkers libraries headers cpufeatures types functions | ||
| 45 | +all: libraries headers cpufeatures types functions | ||
| 46 | @for I in $$(ls $(CONFIGS)); do \ | ||
| 47 | if [ -s $(CONFIGS)/$$I ]; then \ | ||
| 48 | echo "#define $$I"; \ | ||
| 49 | @@ -262,13 +262,6 @@ configdir: | ||
| 50 | clean: | ||
| 51 | @rm -rf $(CONFIGS) config config.h | ||
| 52 | |||
| 53 | -linkers: \ | ||
| 54 | - configdir \ | ||
| 55 | - LD_GOLD | ||
| 56 | - | ||
| 57 | -LD_GOLD: | ||
| 58 | - $(call check_ld,test-ld,HAVE_LD_GOLD,gold) | ||
| 59 | - | ||
| 60 | libraries: \ | ||
| 61 | configdir \ | ||
| 62 | LIB_AIO LIB_APPARMOR LIB_BSD LIB_CRYPT LIB_DL \ | ||
| 63 | -- | ||
| 64 | 2.39.0 | ||
| 65 | |||
diff --git a/meta/recipes-extended/stress-ng/stress-ng_0.15.01.bb b/meta/recipes-extended/stress-ng/stress-ng_0.15.01.bb index 38fd6698b3..0d95cad69f 100644 --- a/meta/recipes-extended/stress-ng/stress-ng_0.15.01.bb +++ b/meta/recipes-extended/stress-ng/stress-ng_0.15.01.bb | |||
| @@ -5,7 +5,8 @@ HOMEPAGE = "https://github.com/ColinIanKing/stress-ng#readme" | |||
| 5 | LICENSE = "GPL-2.0-only" | 5 | LICENSE = "GPL-2.0-only" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 7 | 7 | ||
| 8 | SRC_URI = "git://github.com/ColinIanKing/stress-ng.git;protocol=https;branch=master" | 8 | SRC_URI = "git://github.com/ColinIanKing/stress-ng.git;protocol=https;branch=master \ |
| 9 | file://0001-Pass-LD_GOLD-1-via-makefile-to-enable-gold-linker.patch" | ||
| 9 | SRCREV = "8c7c3d95555c50148470553b55477db895a4f1ad" | 10 | SRCREV = "8c7c3d95555c50148470553b55477db895a4f1ad" |
| 10 | S = "${WORKDIR}/git" | 11 | S = "${WORKDIR}/git" |
| 11 | 12 | ||
