From 8a29c46188b31851b32414d9d3dbb38b1b48a073 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Mon, 24 Feb 2025 07:27:33 +0800 Subject: recipes: drop ld-is-gold support The gold linker support has been dropped in oe-core[1]. Remove related special cases and patches in recipes. [1] https://git.openembedded.org/openembedded-core/commit/?id=a4addb9ab63011e7c604fc5daff95559e7d214e7 Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- .../fuse/files/gold-unversioned-symbol.patch | 92 ---------------------- .../recipes-support/fuse/fuse_2.9.9.bb | 1 - .../recipes-connectivity/samba/samba_4.19.8.bb | 2 +- .../meta-python/recipes-dbs/mongodb/mongodb_git.bb | 4 - .../libhugetlbfs/libhugetlbfs_2.24.bb | 6 -- meta-oe/recipes-dbs/mysql/mariadb.inc | 6 -- .../konkretcmpi/konkretcmpi_0.9.2.bb | 2 - .../files/0001-detect-gold-as-GNU-linker-too.patch | 29 ------- meta-oe/recipes-extended/newt/libnewt_0.52.24.bb | 1 - .../recipes-extended/openwsman/openwsman_2.7.2.bb | 2 - .../sblim-sfcb/sblim-sfcb_1.4.9.bb | 1 - meta-oe/recipes-graphics/directfb/directfb.inc | 3 - meta-oe/recipes-support/lvm2/lvm2.inc | 4 - .../recipes-support/webkitgtk/webkitgtk3_2.44.3.bb | 8 +- 14 files changed, 3 insertions(+), 158 deletions(-) delete mode 100644 meta-filesystems/recipes-support/fuse/files/gold-unversioned-symbol.patch delete mode 100644 meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch diff --git a/meta-filesystems/recipes-support/fuse/files/gold-unversioned-symbol.patch b/meta-filesystems/recipes-support/fuse/files/gold-unversioned-symbol.patch deleted file mode 100644 index d47f692c0e..0000000000 --- a/meta-filesystems/recipes-support/fuse/files/gold-unversioned-symbol.patch +++ /dev/null @@ -1,92 +0,0 @@ -fuse: Fix linking issues with gold linker - -fuse has problems when linking with gold since it uses version -scripts in a way thats so perticular to bfd ld - -/home/kraj/work/angstrom/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/libexec/armv5te-angstrom-linux-gnueabi/gcc/arm-angstro -error: symbol __fuse_exited has undefined version -| collect2: ld returned 1 exit status -| make[1]: *** [libfuse.la] Error 1 -| make[1]: *** Waiting for unfinished jobs.... - -For more details - -http://blog.flameeyes.eu/2011/06/01/gold-readiness-obstacle-2-base-versioning -http://sources.redhat.com/bugzilla/show_bug.cgi?id=10861 -http://comments.gmane.org/gmane.comp.file-systems.fuse.devel/9524 -http://www.airs.com/blog/archives/300 - -Upstream-Status: Pending -Signed-off-by: Khem Raj -Signed-off-by: Koen Kooi -Signed-off-by: Hongxu Jia ---- - lib/fuse.c | 10 +++++----- - lib/fuse_mt.c | 2 +- - lib/fuse_versionscript | 3 +++ - lib/helper.c | 6 +++--- - 4 files changed, 12 insertions(+), 9 deletions(-) - -diff --git a/lib/fuse.c b/lib/fuse.c -index 067d0dc..6d27711 100644 ---- a/lib/fuse.c -+++ b/lib/fuse.c -@@ -4873,11 +4873,11 @@ struct fuse *fuse_new_compat1(int fd, int flags, - 11); - } - --FUSE_SYMVER(".symver fuse_exited,__fuse_exited@"); --FUSE_SYMVER(".symver fuse_process_cmd,__fuse_process_cmd@"); --FUSE_SYMVER(".symver fuse_read_cmd,__fuse_read_cmd@"); --FUSE_SYMVER(".symver fuse_set_getcontext_func,__fuse_set_getcontext_func@"); --FUSE_SYMVER(".symver fuse_new_compat2,fuse_new@"); -+FUSE_SYMVER(".symver fuse_exited,__fuse_exited@FUSE_UNVERSIONED"); -+FUSE_SYMVER(".symver fuse_process_cmd,__fuse_process_cmd@FUSE_UNVERSIONED"); -+FUSE_SYMVER(".symver fuse_read_cmd,__fuse_read_cmd@FUSE_UNVERSIONED"); -+FUSE_SYMVER(".symver fuse_set_getcontext_func,__fuse_set_getcontext_func@FUSE_UNVERSIONED"); -+FUSE_SYMVER(".symver fuse_new_compat2,fuse_new@FUSE_UNVERSIONED"); - FUSE_SYMVER(".symver fuse_new_compat22,fuse_new@FUSE_2.2"); - - #endif /* __FreeBSD__ || __NetBSD__ */ -diff --git a/lib/fuse_mt.c b/lib/fuse_mt.c -index f6dbe71..fd5ac23 100644 ---- a/lib/fuse_mt.c -+++ b/lib/fuse_mt.c -@@ -119,4 +119,4 @@ int fuse_loop_mt(struct fuse *f) - return res; - } - --FUSE_SYMVER(".symver fuse_loop_mt_proc,__fuse_loop_mt@"); -+FUSE_SYMVER(".symver fuse_loop_mt_proc,__fuse_loop_mt@FUSE_UNVERSIONED"); -diff --git a/lib/fuse_versionscript b/lib/fuse_versionscript -index 8d91887..de16ab2 100644 ---- a/lib/fuse_versionscript -+++ b/lib/fuse_versionscript -@@ -1,3 +1,6 @@ -+FUSE_UNVERSIONED { -+}; -+ - FUSE_2.2 { - global: - fuse_destroy; -diff --git a/lib/helper.c b/lib/helper.c -index b644012..c5349bf 100644 ---- a/lib/helper.c -+++ b/lib/helper.c -@@ -436,10 +436,10 @@ int fuse_mount_compat1(const char *mountpoint, const char *args[]) - return fuse_mount_compat22(mountpoint, NULL); - } - --FUSE_SYMVER(".symver fuse_setup_compat2,__fuse_setup@"); -+FUSE_SYMVER(".symver fuse_setup_compat2,__fuse_setup@FUSE_UNVERSIONED"); - FUSE_SYMVER(".symver fuse_setup_compat22,fuse_setup@FUSE_2.2"); --FUSE_SYMVER(".symver fuse_teardown,__fuse_teardown@"); --FUSE_SYMVER(".symver fuse_main_compat2,fuse_main@"); -+FUSE_SYMVER(".symver fuse_teardown,__fuse_teardown@FUSE_UNVERSIONED"); -+FUSE_SYMVER(".symver fuse_main_compat2,fuse_main@FUSE_UNVERSIONED"); - FUSE_SYMVER(".symver fuse_main_real_compat22,fuse_main_real@FUSE_2.2"); - - #endif /* __FreeBSD__ || __NetBSD__ */ --- -1.8.1.2 - diff --git a/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb index fca7d42b39..094ed8c8ad 100644 --- a/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb +++ b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb @@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" SRC_URI = "https://github.com/libfuse/libfuse/releases/download/${BP}/${BP}.tar.gz \ - file://gold-unversioned-symbol.patch \ file://aarch64.patch \ file://0001-fuse-fix-the-return-value-of-help-option.patch \ file://fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch \ diff --git a/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb b/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb index beff73b1b3..05dca8d9c0 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb @@ -125,7 +125,7 @@ EXTRA_OECONF += "--enable-fhs \ --pythondir=${PYTHON_SITEPACKAGES_DIR} \ " -LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" +LDFLAGS += "-Wl,-z,relro,-z,now" do_configure:append() { cd ${S}/pidl/ diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index ee5c77a85d..b4864defb7 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb @@ -73,10 +73,6 @@ WIREDTIGER ?= "off" WIREDTIGER:x86-64 = "on" WIREDTIGER:aarch64 = "on" -# ld.gold: fatal error: build/59f4f0dd/mongo/mongod: Structure needs cleaning -LDFLAGS:append:x86:libc-musl = " -fuse-ld=bfd" -LDFLAGS:remove:toolchain-clang = "-fuse-ld=bfd" - EXTRA_OESCONS = "PREFIX=${prefix} \ DESTDIR=${D} \ MAXLINELENGTH='2097152' \ diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb index d82e03e81f..afed3b4a81 100644 --- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb +++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb @@ -50,15 +50,9 @@ LDFLAGS += "-B${S}" inherit autotools-brokensep cpan-base -#The CUSTOM_LDSCRIPTS doesn't work with the gold linker do_configure:prepend() { - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then - sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile.in - fi - ln -sf ld.hugetlbfs ${S}/ld ln -sf ld.hugetlbfs ${S}/ld.bfd - ln -sf ld.hugetlbfs ${S}/ld.gold ln -sf ld.hugetlbfs ${S}/ld.lld } diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index b620355730..51eaf4a502 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -69,14 +69,8 @@ PACKAGECONFIG[krb5] = ", ,krb5" PACKAGECONFIG[lz4] = ", ,lz4" PACKAGECONFIG[openssl] = "-DWITH_SSL='system',-DWITH_SSL='bundled',openssl" -# MariaDB doesn't link properly with gold -# https://mariadb.atlassian.net/browse/MDEV-5982 -TARGET_CFLAGS += "-fuse-ld=bfd" LDFLAGS += " -pthread" -BUILD_CFLAGS += "-fuse-ld=bfd" -BUILD_CXXFLAGS += "-fuse-ld=bfd" - LDFLAGS:x86:toolchain-clang = "-latomic" LDFLAGS:riscv32:toolchain-clang = "-latomic" diff --git a/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb b/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb index 6b60d89187..bd3a8f2ff5 100644 --- a/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb +++ b/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb @@ -24,8 +24,6 @@ EXTRA_OECMAKE = "-DWITH_PYTHON=ON \ ${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \ " -LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" - do_install:append() { rm -rf ${D}${datadir} } diff --git a/meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch b/meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch deleted file mode 100644 index 090ed5c1c9..0000000000 --- a/meta-oe/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 08ba909500412611953aea0fa2fe0d8fe76b6e24 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Wed, 21 Sep 2016 21:14:40 +0200 -Subject: [PATCH] detect gold as GNU linker too -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 468c718..cd93f30 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -28,7 +28,7 @@ AC_CHECK_SIZEOF([void *]) - AC_MSG_CHECKING([for GNU ld]) - LD=$($CC -print-prog-name=ld 2>&5) - --if test $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld") = 0; then -+if test $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ") = 0; then - # Not - GNU_LD="" - AC_MSG_RESULT([no]) diff --git a/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb b/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb index 1e39a1c5ca..834dddd0b5 100644 --- a/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb +++ b/meta-oe/recipes-extended/newt/libnewt_0.52.24.bb @@ -20,7 +20,6 @@ DEPENDS = "slang popt python3" SRC_URI = "https://releases.pagure.org/newt/newt-${PV}.tar.gz \ file://cross_ar.patch \ file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \ - file://0001-detect-gold-as-GNU-linker-too.patch \ " SRC_URI[sha256sum] = "5ded7e221f85f642521c49b1826c8de19845aa372baf5d630a51774b544fbdbb" diff --git a/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb b/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb index 5437ea13e8..d8dda6d090 100644 --- a/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb +++ b/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb @@ -34,8 +34,6 @@ inherit systemd cmake pkgconfig python3native perlnative SYSTEMD_SERVICE:${PN} = "openwsmand.service" SYSTEMD_AUTO_ENABLE = "disable" -LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', " -fuse-ld=bfd ", '', d)}" - EXTRA_OECMAKE = "-DBUILD_BINDINGS=NO \ -DBUILD_LIBCIM=NO \ -DBUILD_PERL=YES \ diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb index 083cfcb810..622c5ce07c 100644 --- a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb +++ b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb @@ -42,7 +42,6 @@ SYSTEMD_PACKAGES = "${PN}" SYSTEMD_SERVICE:${PN} = "sblim-sfcb.service" SYSTEMD_AUTO_ENABLE = "enable" -LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--allow-shlib-undefined ', '', d)}" EXTRA_OECONF = '--enable-debug \ diff --git a/meta-oe/recipes-graphics/directfb/directfb.inc b/meta-oe/recipes-graphics/directfb/directfb.inc index 59796cc65f..df65478b40 100644 --- a/meta-oe/recipes-graphics/directfb/directfb.inc +++ b/meta-oe/recipes-graphics/directfb/directfb.inc @@ -34,9 +34,6 @@ LDFLAGS:append = " -lm" CXXFLAGS:append:toolchain-clang = " -Wno-error=dtor-typedef" -# Workaround for linking issues seen with armv7a + gold -LDFLAGS:append:arm = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" - BINCONFIG = "${bindir}/directfb-config" inherit autotools binconfig-disabled pkgconfig diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc index 1f608c29d0..9ff7662a51 100644 --- a/meta-oe/recipes-support/lvm2/lvm2.inc +++ b/meta-oe/recipes-support/lvm2/lvm2.inc @@ -58,7 +58,3 @@ EXTRA_OECONF = "--with-user= \ --with-thin-repair=${sbindir}/thin_repair \ --with-thin-restore=${sbindir}/thin_restore \ " - -# gold doesn't like multiple dm_bitset_parse_list definitions in libdm/.exported_symbols.DM_1_02_138 and libdm/.exported_symbols.DM_1_02_129 -# after it was uncommented in the later in 2.03.12 with https://github.com/lvmteam/lvm2/commit/60eb608d66c2056a78e81f27db3da14139d9faab -LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', " -fuse-ld=bfd", '', d)}" diff --git a/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb b/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb index 52bf2eb399..07fa0d06f7 100644 --- a/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb +++ b/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb @@ -135,12 +135,8 @@ EXTRA_OECMAKE:append:armv7a = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES EXTRA_OECMAKE:append:armv7r = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" EXTRA_OECMAKE:append:armv7ve = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" -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" +# JIT does not work on RISCV +EXTRA_OECMAKE:append:riscv32 = " -DENABLE_JIT=OFF" # JIT not supported on MIPS either EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " -- cgit v1.2.3-54-g00ecf