summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-06 14:48:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-10 13:03:57 +0000
commit89ce67d8e41cc50a9b9ee225c054729f9cee7cdc (patch)
tree8bb5d2ed19e0c205289008d2bce9d6a64d24eb95
parent6d0cf6477c1703d60befe13f293afd0a602553a1 (diff)
downloadpoky-89ce67d8e41cc50a9b9ee225c054729f9cee7cdc.tar.gz
recipes: Drop ld-is-gold support
Gold hasn't seen development in some time and is being dropped from binutils releases. Drop the small number of special cases for it we were carrying. This patch also turns off gold in the binutils recipe. (From OE-Core rev: a4addb9ab63011e7c604fc5daff95559e7d214e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc6
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc20
-rw-r--r--meta/recipes-devtools/rust/libstd-rs_1.81.0.bb5
-rw-r--r--meta/recipes-devtools/rust/rust_1.81.0.bb5
-rw-r--r--meta/recipes-extended/ltp/ltp_20240930.bb9
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb4
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.46.5.bb9
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.6.2.bb2
8 files changed, 10 insertions, 50 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 3270c22e8d..9464736b84 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -10,7 +10,7 @@ inherit uboot-config uboot-extlinux-config uboot-sign deploy python3native kerne
10DEPENDS += "swig-native" 10DEPENDS += "swig-native"
11 11
12EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} V=1' 12EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} V=1'
13EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)} ${DEBUG_PREFIX_MAP}"' 13EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}"'
14EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' 14EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
15EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' 15EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
16 16
@@ -35,10 +35,6 @@ require u-boot-configure.inc
35 35
36UBOOT_ARCH_DIR = "${@'arm' if d.getVar('UBOOT_ARCH').startswith('arm') else d.getVar('UBOOT_ARCH')}" 36UBOOT_ARCH_DIR = "${@'arm' if d.getVar('UBOOT_ARCH').startswith('arm') else d.getVar('UBOOT_ARCH')}"
37do_compile () { 37do_compile () {
38 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
39 sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
40 fi
41
42 unset LDFLAGS 38 unset LDFLAGS
43 unset CFLAGS 39 unset CFLAGS
44 unset CPPFLAGS 40 unset CPPFLAGS
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 81443105f6..00b1301258 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -56,12 +56,6 @@ GPROFNG_ALTS:x86 = "${GPROFNGS}"
56GPROFNG_ALTS:x86-64 = "${GPROFNGS}" 56GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
57GPROFNG_ALTS:aarch64 = "${GPROFNGS}" 57GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
58 58
59LDGOLD_ALTS ?= "ld.gold dwp"
60LDGOLD_ALTS:riscv64 = ""
61LDGOLD_ALTS:riscv32 = ""
62LDGOLD_ALTS:loongarch64 = ""
63LDGOLD_ALTS:libc-glibc:mipsarch = ""
64
65USE_ALTERNATIVES_FOR = " \ 59USE_ALTERNATIVES_FOR = " \
66 addr2line \ 60 addr2line \
67 ar \ 61 ar \
@@ -72,7 +66,6 @@ USE_ALTERNATIVES_FOR = " \
72 ${GPROFNG_ALTS} \ 66 ${GPROFNG_ALTS} \
73 ld \ 67 ld \
74 ld.bfd \ 68 ld.bfd \
75 ${LDGOLD_ALTS} \
76 nm \ 69 nm \
77 objcopy \ 70 objcopy \
78 objdump \ 71 objdump \
@@ -104,7 +97,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
104 --disable-libdecnumber \ 97 --disable-libdecnumber \
105 --disable-readline \ 98 --disable-readline \
106 --disable-sim \ 99 --disable-sim \
107 ${LDGOLD} \ 100 --disable-gold \
108 ${EXTRA_TARGETS} \ 101 ${EXTRA_TARGETS} \
109 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" 102 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
110 103
@@ -112,12 +105,6 @@ EXTRA_TARGETS = ""
112EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " 105EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep "
113EXTRA_TARGETS:class-native = "" 106EXTRA_TARGETS:class-native = ""
114 107
115LDGOLD:class-native = ""
116LDGOLD:class-crosssdk = ""
117LDGOLD:libc-glibc:mipsarch = ""
118LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
119
120
121# This is necessary due to a bug in the binutils Makefiles 108# This is necessary due to a bug in the binutils Makefiles
122# EXTRA_OEMAKE = "configure-build-libiberty all" 109# EXTRA_OEMAKE = "configure-build-libiberty all"
123 110
@@ -204,8 +191,3 @@ inherit update-alternatives
204ALTERNATIVE_PRIORITY = "100" 191ALTERNATIVE_PRIORITY = "100"
205 192
206ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}" 193ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}"
207
208python () {
209 if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64 loongarch64', True, False, d):
210 bb.fatal("Gold linker does not _yet_ support RISC-V and LoongArch architecture please remove ld-is-gold from DISTRO_FEATURES")
211}
diff --git a/meta/recipes-devtools/rust/libstd-rs_1.81.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.81.0.bb
index 14161714f2..06a2889b92 100644
--- a/meta/recipes-devtools/rust/libstd-rs_1.81.0.bb
+++ b/meta/recipes-devtools/rust/libstd-rs_1.81.0.bb
@@ -48,8 +48,3 @@ do_install () {
48} 48}
49 49
50BBCLASSEXTEND = "nativesdk" 50BBCLASSEXTEND = "nativesdk"
51
52# Since 1.70.0 upgrade this fails to build with gold:
53# http://errors.yoctoproject.org/Errors/Details/708194/
54# ld: error: version script assignment of to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined
55LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-fuse-ld=bfd', '', d)}"
diff --git a/meta/recipes-devtools/rust/rust_1.81.0.bb b/meta/recipes-devtools/rust/rust_1.81.0.bb
index 1038c275f6..c4f8ee7108 100644
--- a/meta/recipes-devtools/rust/rust_1.81.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.81.0.bb
@@ -377,8 +377,3 @@ RUSTLIB_DEP:class-nativesdk = ""
377INSANE_SKIP:${PN} = "staticdev" 377INSANE_SKIP:${PN} = "staticdev"
378 378
379BBCLASSEXTEND = "native nativesdk" 379BBCLASSEXTEND = "native nativesdk"
380
381# Since 1.70.0 upgrade this fails to build with gold:
382# http://errors.yoctoproject.org/Errors/Details/708196/
383# ld: error: version script assignment of to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined
384LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-fuse-ld=bfd', '', d)}"
diff --git a/meta/recipes-extended/ltp/ltp_20240930.bb b/meta/recipes-extended/ltp/ltp_20240930.bb
index 3fe8772ea7..0760170c7b 100644
--- a/meta/recipes-extended/ltp/ltp_20240930.bb
+++ b/meta/recipes-extended/ltp/ltp_20240930.bb
@@ -36,19 +36,18 @@ S = "${WORKDIR}/git"
36 36
37inherit autotools-brokensep pkgconfig 37inherit autotools-brokensep pkgconfig
38 38
39# Version 20220527 added KVM test infrastructure which currently fails to build with gold due to 39# Version 20220527 added KVM test infrastructure which currently fails to build with lld due to
40# SORT_NONE in linker script which isn't supported by gold: 40# SORT_NONE in linker script which isn't supported by gold:
41# https://sourceware.org/bugzilla/show_bug.cgi?id=18097 41# https://sourceware.org/bugzilla/show_bug.cgi?id=18097
42# https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36 42# https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36
43LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-fuse-ld=bfd', '', d)}"
44LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-fuse-ld=bfd', '', d)}" 43LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-fuse-ld=bfd', '', d)}"
45 44
46# After 0002-kvm-use-LD-instead-of-hardcoding-ld.patch 45# After 0002-kvm-use-LD-instead-of-hardcoding-ld.patch
47# https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb 46# https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb
48# it fails with gold also a bit later when trying to use *-payload.bin 47# it fails with lld also a bit later when trying to use *-payload.bin
49# http://errors.yoctoproject.org/Errors/Details/663094/ 48# http://errors.yoctoproject.org/Errors/Details/663094/
50# work around this by forcing .bfd linked in LD when ld-is-gold is in DISTRO_FEATURES 49# work around this by forcing .bfd linked in LD when ld-is-lld is in DISTRO_FEATURES
51KVM_LD = "${@bb.utils.contains_any('DISTRO_FEATURES', 'ld-is-gold ld-is-lld', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}" 50KVM_LD = "${@bb.utils.contains_any('DISTRO_FEATURES', 'ld-is-lld', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}"
52 51
53TARGET_CC_ARCH += "${LDFLAGS}" 52TARGET_CC_ARCH += "${LDFLAGS}"
54 53
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
index 1c72d503d3..c8f226ff3a 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
@@ -142,10 +142,6 @@ EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic"
142EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" 142EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
143EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" 143EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
144 144
145# gold crashes on x86, another solution is to --disable-asm but thats more hacky
146# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
147
148LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
149LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}" 145LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}"
150 146
151EXTRA_OEMAKE = "V=1" 147EXTRA_OEMAKE = "V=1"
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.46.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.46.5.bb
index d8b91d66c7..8c6ffdc8a7 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.46.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.46.5.bb
@@ -118,12 +118,9 @@ EXTRA_OECMAKE:append:armv4 = " -DENABLE_JIT=OFF "
118EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF " 118EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF "
119EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF " 119EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF "
120 120
121EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF " 121# JIT does not work on RISCV
122EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF " 122EXTRA_OECMAKE:append:riscv32 = " -DENABLE_JIT=OFF"
123 123EXTRA_OECMAKE:append:riscv64 = " -DENABLE_JIT=OFF"
124# JIT and gold linker does not work on RISCV
125EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF"
126EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF"
127 124
128# JIT not supported on MIPS either 125# JIT not supported on MIPS either
129EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " 126EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON "
diff --git a/meta/recipes-support/libunwind/libunwind_1.6.2.bb b/meta/recipes-support/libunwind/libunwind_1.6.2.bb
index c7b1604b61..b2e7ec7719 100644
--- a/meta/recipes-support/libunwind/libunwind_1.6.2.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.6.2.bb
@@ -30,7 +30,7 @@ EXTRA_OECONF = "--enable-static"
30ARM_INSTRUCTION_SET:armv4 = "arm" 30ARM_INSTRUCTION_SET:armv4 = "arm"
31ARM_INSTRUCTION_SET:armv5 = "arm" 31ARM_INSTRUCTION_SET:armv5 = "arm"
32 32
33LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" 33LDFLAGS += "-Wl,-z,relro,-z,now"
34 34
35SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared" 35SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared"
36CACHED_CONFIGUREVARS:append:libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'" 36CACHED_CONFIGUREVARS:append:libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'"