diff mbox series

recipes: Drop ld-is-gold support

Message ID 20250206144911.3776785-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit a4addb9ab63011e7c604fc5daff95559e7d214e7
Headers show
Series recipes: Drop ld-is-gold support | expand

Commit Message

Richard Purdie Feb. 6, 2025, 2:49 p.m. UTC
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-bsp/u-boot/u-boot.inc            |  6 +-----
 meta/recipes-devtools/binutils/binutils.inc   | 20 +------------------
 .../recipes-devtools/rust/libstd-rs_1.81.0.bb |  5 -----
 meta/recipes-devtools/rust/rust_1.81.0.bb     |  5 -----
 meta/recipes-extended/ltp/ltp_20240930.bb     |  9 ++++-----
 meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb  |  4 ----
 meta/recipes-sato/webkit/webkitgtk_2.46.5.bb  |  9 +++------
 .../libunwind/libunwind_1.6.2.bb              |  2 +-
 8 files changed, 10 insertions(+), 50 deletions(-)

Comments

Khem Raj Feb. 6, 2025, 4:05 p.m. UTC | #1
LGTM

On Thu, Feb 6, 2025 at 6:49 AM Richard Purdie via
lists.openembedded.org
<richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
>
> 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.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/recipes-bsp/u-boot/u-boot.inc            |  6 +-----
>  meta/recipes-devtools/binutils/binutils.inc   | 20 +------------------
>  .../recipes-devtools/rust/libstd-rs_1.81.0.bb |  5 -----
>  meta/recipes-devtools/rust/rust_1.81.0.bb     |  5 -----
>  meta/recipes-extended/ltp/ltp_20240930.bb     |  9 ++++-----
>  meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb  |  4 ----
>  meta/recipes-sato/webkit/webkitgtk_2.46.5.bb  |  9 +++------
>  .../libunwind/libunwind_1.6.2.bb              |  2 +-
>  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 3270c22e8d4..9464736b841 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
>  DEPENDS += "swig-native"
>
>  EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} V=1'
> -EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)} ${DEBUG_PREFIX_MAP}"'
> +EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}"'
>  EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
>  EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
>
> @@ -35,10 +35,6 @@ require u-boot-configure.inc
>
>  UBOOT_ARCH_DIR = "${@'arm' if d.getVar('UBOOT_ARCH').startswith('arm') else d.getVar('UBOOT_ARCH')}"
>  do_compile () {
> -    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
> -        sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
> -    fi
> -
>      unset LDFLAGS
>      unset CFLAGS
>      unset CPPFLAGS
> diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
> index 81443105f69..00b13012585 100644
> --- a/meta/recipes-devtools/binutils/binutils.inc
> +++ b/meta/recipes-devtools/binutils/binutils.inc
> @@ -56,12 +56,6 @@ GPROFNG_ALTS:x86 = "${GPROFNGS}"
>  GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
>  GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
>
> -LDGOLD_ALTS ?= "ld.gold dwp"
> -LDGOLD_ALTS:riscv64 = ""
> -LDGOLD_ALTS:riscv32 = ""
> -LDGOLD_ALTS:loongarch64 = ""
> -LDGOLD_ALTS:libc-glibc:mipsarch = ""
> -
>  USE_ALTERNATIVES_FOR = " \
>         addr2line \
>         ar \
> @@ -72,7 +66,6 @@ USE_ALTERNATIVES_FOR = " \
>         ${GPROFNG_ALTS} \
>         ld \
>         ld.bfd \
> -       ${LDGOLD_ALTS} \
>         nm \
>         objcopy \
>         objdump \
> @@ -104,7 +97,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
>                  --disable-libdecnumber \
>                  --disable-readline \
>                  --disable-sim \
> -                ${LDGOLD} \
> +                --disable-gold \
>                  ${EXTRA_TARGETS} \
>                  ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
>
> @@ -112,12 +105,6 @@ EXTRA_TARGETS = ""
>  EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep "
>  EXTRA_TARGETS:class-native = ""
>
> -LDGOLD:class-native = ""
> -LDGOLD:class-crosssdk = ""
> -LDGOLD:libc-glibc:mipsarch = ""
> -LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
> -
> -
>  # This is necessary due to a bug in the binutils Makefiles
>  # EXTRA_OEMAKE = "configure-build-libiberty all"
>
> @@ -204,8 +191,3 @@ inherit update-alternatives
>  ALTERNATIVE_PRIORITY = "100"
>
>  ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}"
> -
> -python () {
> -    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):
> -        bb.fatal("Gold linker does not _yet_ support RISC-V and LoongArch architecture please remove ld-is-gold from DISTRO_FEATURES")
> -}
> 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 14161714f2b..06a2889b92c 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 () {
>  }
>
>  BBCLASSEXTEND = "nativesdk"
> -
> -# Since 1.70.0 upgrade this fails to build with gold:
> -# http://errors.yoctoproject.org/Errors/Details/708194/
> -# ld: error: version script assignment of  to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined
> -LDFLAGS += "${@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 1038c275f6d..c4f8ee7108f 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 = ""
>  INSANE_SKIP:${PN} = "staticdev"
>
>  BBCLASSEXTEND = "native nativesdk"
> -
> -# Since 1.70.0 upgrade this fails to build with gold:
> -# http://errors.yoctoproject.org/Errors/Details/708196/
> -# ld: error: version script assignment of  to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined
> -LDFLAGS += "${@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 3fe8772ea71..0760170c7b0 100644
> --- a/meta/recipes-extended/ltp/ltp_20240930.bb
> +++ b/meta/recipes-extended/ltp/ltp_20240930.bb
> @@ -36,19 +36,18 @@ S = "${WORKDIR}/git"
>
>  inherit autotools-brokensep pkgconfig
>
> -# Version 20220527 added KVM test infrastructure which currently fails to build with gold due to
> +# Version 20220527 added KVM test infrastructure which currently fails to build with lld due to
>  # SORT_NONE in linker script which isn't supported by gold:
>  # https://sourceware.org/bugzilla/show_bug.cgi?id=18097
>  # https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36
> -LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-fuse-ld=bfd', '', d)}"
>  LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-fuse-ld=bfd', '', d)}"
>
>  # After 0002-kvm-use-LD-instead-of-hardcoding-ld.patch
>  # https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb
> -# it fails with gold also a bit later when trying to use *-payload.bin
> +# it fails with lld also a bit later when trying to use *-payload.bin
>  # http://errors.yoctoproject.org/Errors/Details/663094/
> -# work around this by forcing .bfd linked in LD when ld-is-gold is in DISTRO_FEATURES
> -KVM_LD = "${@bb.utils.contains_any('DISTRO_FEATURES', 'ld-is-gold ld-is-lld', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}"
> +# work around this by forcing .bfd linked in LD when ld-is-lld is in DISTRO_FEATURES
> +KVM_LD = "${@bb.utils.contains_any('DISTRO_FEATURES', 'ld-is-lld', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}"
>
>  TARGET_CC_ARCH += "${LDFLAGS}"
>
> diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
> index 1c72d503d3c..c8f226ff3ae 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"
>  EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
>  EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
>
> -# gold crashes on x86, another solution is to --disable-asm but thats more hacky
> -# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
> -
> -LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
>  LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}"
>
>  EXTRA_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 d8b91d66c71..8c6ffdc8a73 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 "
>  EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF "
>  EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF "
>
> -EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF "
> -EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF "
> -
> -# JIT and gold linker does not work on RISCV
> -EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF"
> -EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF"
> +# JIT does not work on RISCV
> +EXTRA_OECMAKE:append:riscv32 = " -DENABLE_JIT=OFF"
> +EXTRA_OECMAKE:append:riscv64 = " -DENABLE_JIT=OFF"
>
>  # JIT not supported on MIPS either
>  EXTRA_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 c7b1604b611..b2e7ec77190 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"
>  ARM_INSTRUCTION_SET:armv4 = "arm"
>  ARM_INSTRUCTION_SET:armv5 = "arm"
>
> -LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
> +LDFLAGS += "-Wl,-z,relro,-z,now"
>
>  SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared"
>  CACHED_CONFIGUREVARS:append:libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#210940): https://lists.openembedded.org/g/openembedded-core/message/210940
> Mute This Topic: https://lists.openembedded.org/mt/111032724/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Mathieu Dubois-Briand Feb. 7, 2025, 4:08 p.m. UTC | #2
On Thu Feb 6, 2025 at 3:49 PM CET, Richard Purdie via lists.openembedded.org wrote:
> 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.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---

Hi Richard,

We get some errors while building go. I fear this comes from this patch:

| # /srv/pokybuild/yocto-worker/genericarm64-alt/build/build/tmp/work/armv8a-poky-linux/go-runtime/1.22.11/build-tmp/go-build691092281/b285/libstd.so
| /srv/pokybuild/yocto-worker/genericarm64-alt/build/build/tmp/work/armv8a-poky-linux/go-runtime/1.22.11/go/pkg/tool/native_native/link: running aarch64-poky-linux-gcc failed: exit status 1
| collect2: fatal error: cannot find 'ld'

https://autobuilder.yoctoproject.org/valkyrie/#/builders/22/builds/974/steps/11/logs/stdio
Richard Purdie Feb. 7, 2025, 4:09 p.m. UTC | #3
On Fri, 2025-02-07 at 17:08 +0100, Mathieu Dubois-Briand wrote:
> On Thu Feb 6, 2025 at 3:49 PM CET, Richard Purdie via
> lists.openembedded.org wrote:
> > 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.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> 
> Hi Richard,
> 
> We get some errors while building go. I fear this comes from this
> patch:
> 
> > # /srv/pokybuild/yocto-worker/genericarm64-
> > alt/build/build/tmp/work/armv8a-poky-linux/go-
> > runtime/1.22.11/build-tmp/go-build691092281/b285/libstd.so
> > /srv/pokybuild/yocto-worker/genericarm64-
> > alt/build/build/tmp/work/armv8a-poky-linux/go-
> > runtime/1.22.11/go/pkg/tool/native_native/link: running aarch64-
> > poky-linux-gcc failed: exit status 1
> > collect2: fatal error: cannot find 'ld'
> 
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/22/builds/974/steps/11/logs/stdio

I'm seeing them too and fear you may be right. It is only on aarch64 :/

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 3270c22e8d4..9464736b841 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
 DEPENDS += "swig-native"
 
 EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} V=1'
-EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)} ${DEBUG_PREFIX_MAP}"'
+EXTRA_OEMAKE += 'CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP}"'
 EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
 EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
 
@@ -35,10 +35,6 @@  require u-boot-configure.inc
 
 UBOOT_ARCH_DIR = "${@'arm' if d.getVar('UBOOT_ARCH').startswith('arm') else d.getVar('UBOOT_ARCH')}"
 do_compile () {
-    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
-        sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
-    fi
-
     unset LDFLAGS
     unset CFLAGS
     unset CPPFLAGS
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 81443105f69..00b13012585 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -56,12 +56,6 @@  GPROFNG_ALTS:x86 = "${GPROFNGS}"
 GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
 GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
 
-LDGOLD_ALTS ?= "ld.gold dwp"
-LDGOLD_ALTS:riscv64 = ""
-LDGOLD_ALTS:riscv32 = ""
-LDGOLD_ALTS:loongarch64 = ""
-LDGOLD_ALTS:libc-glibc:mipsarch = ""
-
 USE_ALTERNATIVES_FOR = " \
 	addr2line \
 	ar \
@@ -72,7 +66,6 @@  USE_ALTERNATIVES_FOR = " \
 	${GPROFNG_ALTS} \
 	ld \
 	ld.bfd \
-	${LDGOLD_ALTS} \
 	nm \
 	objcopy \
 	objdump \
@@ -104,7 +97,7 @@  EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
                 --disable-libdecnumber \
                 --disable-readline \
                 --disable-sim \
-                ${LDGOLD} \
+                --disable-gold \
                 ${EXTRA_TARGETS} \
                 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
 
@@ -112,12 +105,6 @@  EXTRA_TARGETS = ""
 EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep "
 EXTRA_TARGETS:class-native = ""
 
-LDGOLD:class-native = ""
-LDGOLD:class-crosssdk = ""
-LDGOLD:libc-glibc:mipsarch = ""
-LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
-
-
 # This is necessary due to a bug in the binutils Makefiles
 # EXTRA_OEMAKE = "configure-build-libiberty all"
 
@@ -204,8 +191,3 @@  inherit update-alternatives
 ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}"
-
-python () {
-    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):
-        bb.fatal("Gold linker does not _yet_ support RISC-V and LoongArch architecture please remove ld-is-gold from DISTRO_FEATURES")
-}
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 14161714f2b..06a2889b92c 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 () {
 }
 
 BBCLASSEXTEND = "nativesdk"
-
-# Since 1.70.0 upgrade this fails to build with gold:
-# http://errors.yoctoproject.org/Errors/Details/708194/
-# ld: error: version script assignment of  to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined
-LDFLAGS += "${@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 1038c275f6d..c4f8ee7108f 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 = ""
 INSANE_SKIP:${PN} = "staticdev"
 
 BBCLASSEXTEND = "native nativesdk"
-
-# Since 1.70.0 upgrade this fails to build with gold:
-# http://errors.yoctoproject.org/Errors/Details/708196/
-# ld: error: version script assignment of  to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined
-LDFLAGS += "${@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 3fe8772ea71..0760170c7b0 100644
--- a/meta/recipes-extended/ltp/ltp_20240930.bb
+++ b/meta/recipes-extended/ltp/ltp_20240930.bb
@@ -36,19 +36,18 @@  S = "${WORKDIR}/git"
 
 inherit autotools-brokensep pkgconfig
 
-# Version 20220527 added KVM test infrastructure which currently fails to build with gold due to
+# Version 20220527 added KVM test infrastructure which currently fails to build with lld due to
 # SORT_NONE in linker script which isn't supported by gold:
 # https://sourceware.org/bugzilla/show_bug.cgi?id=18097
 # https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36
-LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-fuse-ld=bfd', '', d)}"
 LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-fuse-ld=bfd', '', d)}"
 
 # After 0002-kvm-use-LD-instead-of-hardcoding-ld.patch
 # https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb
-# it fails with gold also a bit later when trying to use *-payload.bin
+# it fails with lld also a bit later when trying to use *-payload.bin
 # http://errors.yoctoproject.org/Errors/Details/663094/
-# work around this by forcing .bfd linked in LD when ld-is-gold is in DISTRO_FEATURES
-KVM_LD = "${@bb.utils.contains_any('DISTRO_FEATURES', 'ld-is-gold ld-is-lld', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}"
+# work around this by forcing .bfd linked in LD when ld-is-lld is in DISTRO_FEATURES
+KVM_LD = "${@bb.utils.contains_any('DISTRO_FEATURES', 'ld-is-lld', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
index 1c72d503d3c..c8f226ff3ae 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"
 EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
 EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
 
-# gold crashes on x86, another solution is to --disable-asm but thats more hacky
-# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
-
-LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
 LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}"
 
 EXTRA_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 d8b91d66c71..8c6ffdc8a73 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 "
 EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF "
 EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF "
 
-EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF "
-EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF "
-
-# JIT and gold linker does not work on RISCV
-EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF"
-EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF"
+# JIT does not work on RISCV
+EXTRA_OECMAKE:append:riscv32 = " -DENABLE_JIT=OFF"
+EXTRA_OECMAKE:append:riscv64 = " -DENABLE_JIT=OFF"
 
 # JIT not supported on MIPS either
 EXTRA_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 c7b1604b611..b2e7ec77190 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"
 ARM_INSTRUCTION_SET:armv4 = "arm"
 ARM_INSTRUCTION_SET:armv5 = "arm"
 
-LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+LDFLAGS += "-Wl,-z,relro,-z,now"
 
 SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared"
 CACHED_CONFIGUREVARS:append:libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'"