mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
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 <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
7e576c0409
commit
8a29c46188
@ -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 <raj.khem@gmail.com>
|
|
||||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
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
|
|
||||||
|
|
||||||
@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|||||||
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
|
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
|
||||||
|
|
||||||
SRC_URI = "https://github.com/libfuse/libfuse/releases/download/${BP}/${BP}.tar.gz \
|
SRC_URI = "https://github.com/libfuse/libfuse/releases/download/${BP}/${BP}.tar.gz \
|
||||||
file://gold-unversioned-symbol.patch \
|
|
||||||
file://aarch64.patch \
|
file://aarch64.patch \
|
||||||
file://0001-fuse-fix-the-return-value-of-help-option.patch \
|
file://0001-fuse-fix-the-return-value-of-help-option.patch \
|
||||||
file://fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch \
|
file://fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch \
|
||||||
|
|||||||
@ -125,7 +125,7 @@ EXTRA_OECONF += "--enable-fhs \
|
|||||||
--pythondir=${PYTHON_SITEPACKAGES_DIR} \
|
--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() {
|
do_configure:append() {
|
||||||
cd ${S}/pidl/
|
cd ${S}/pidl/
|
||||||
|
|||||||
@ -73,10 +73,6 @@ WIREDTIGER ?= "off"
|
|||||||
WIREDTIGER:x86-64 = "on"
|
WIREDTIGER:x86-64 = "on"
|
||||||
WIREDTIGER:aarch64 = "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} \
|
EXTRA_OESCONS = "PREFIX=${prefix} \
|
||||||
DESTDIR=${D} \
|
DESTDIR=${D} \
|
||||||
MAXLINELENGTH='2097152' \
|
MAXLINELENGTH='2097152' \
|
||||||
|
|||||||
@ -50,15 +50,9 @@ LDFLAGS += "-B${S}"
|
|||||||
|
|
||||||
inherit autotools-brokensep cpan-base
|
inherit autotools-brokensep cpan-base
|
||||||
|
|
||||||
#The CUSTOM_LDSCRIPTS doesn't work with the gold linker
|
|
||||||
do_configure:prepend() {
|
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
|
||||||
ln -sf ld.hugetlbfs ${S}/ld.bfd
|
ln -sf ld.hugetlbfs ${S}/ld.bfd
|
||||||
ln -sf ld.hugetlbfs ${S}/ld.gold
|
|
||||||
ln -sf ld.hugetlbfs ${S}/ld.lld
|
ln -sf ld.hugetlbfs ${S}/ld.lld
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -69,14 +69,8 @@ PACKAGECONFIG[krb5] = ", ,krb5"
|
|||||||
PACKAGECONFIG[lz4] = ", ,lz4"
|
PACKAGECONFIG[lz4] = ", ,lz4"
|
||||||
PACKAGECONFIG[openssl] = "-DWITH_SSL='system',-DWITH_SSL='bundled',openssl"
|
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"
|
LDFLAGS += " -pthread"
|
||||||
|
|
||||||
BUILD_CFLAGS += "-fuse-ld=bfd"
|
|
||||||
BUILD_CXXFLAGS += "-fuse-ld=bfd"
|
|
||||||
|
|
||||||
LDFLAGS:x86:toolchain-clang = "-latomic"
|
LDFLAGS:x86:toolchain-clang = "-latomic"
|
||||||
LDFLAGS:riscv32:toolchain-clang = "-latomic"
|
LDFLAGS:riscv32:toolchain-clang = "-latomic"
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,6 @@ EXTRA_OECMAKE = "-DWITH_PYTHON=ON \
|
|||||||
${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
|
${@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() {
|
do_install:append() {
|
||||||
rm -rf ${D}${datadir}
|
rm -rf ${D}${datadir}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
From 08ba909500412611953aea0fa2fe0d8fe76b6e24 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
|
||||||
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 <schnitzeltony@googlemail.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
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])
|
|
||||||
@ -20,7 +20,6 @@ DEPENDS = "slang popt python3"
|
|||||||
SRC_URI = "https://releases.pagure.org/newt/newt-${PV}.tar.gz \
|
SRC_URI = "https://releases.pagure.org/newt/newt-${PV}.tar.gz \
|
||||||
file://cross_ar.patch \
|
file://cross_ar.patch \
|
||||||
file://Makefile.in-Add-tinfo-library-to-the-linking-librari.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"
|
SRC_URI[sha256sum] = "5ded7e221f85f642521c49b1826c8de19845aa372baf5d630a51774b544fbdbb"
|
||||||
|
|||||||
@ -34,8 +34,6 @@ inherit systemd cmake pkgconfig python3native perlnative
|
|||||||
SYSTEMD_SERVICE:${PN} = "openwsmand.service"
|
SYSTEMD_SERVICE:${PN} = "openwsmand.service"
|
||||||
SYSTEMD_AUTO_ENABLE = "disable"
|
SYSTEMD_AUTO_ENABLE = "disable"
|
||||||
|
|
||||||
LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', " -fuse-ld=bfd ", '', d)}"
|
|
||||||
|
|
||||||
EXTRA_OECMAKE = "-DBUILD_BINDINGS=NO \
|
EXTRA_OECMAKE = "-DBUILD_BINDINGS=NO \
|
||||||
-DBUILD_LIBCIM=NO \
|
-DBUILD_LIBCIM=NO \
|
||||||
-DBUILD_PERL=YES \
|
-DBUILD_PERL=YES \
|
||||||
|
|||||||
@ -42,7 +42,6 @@ SYSTEMD_PACKAGES = "${PN}"
|
|||||||
SYSTEMD_SERVICE:${PN} = "sblim-sfcb.service"
|
SYSTEMD_SERVICE:${PN} = "sblim-sfcb.service"
|
||||||
SYSTEMD_AUTO_ENABLE = "enable"
|
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)}"
|
LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--allow-shlib-undefined ', '', d)}"
|
||||||
|
|
||||||
EXTRA_OECONF = '--enable-debug \
|
EXTRA_OECONF = '--enable-debug \
|
||||||
|
|||||||
@ -34,9 +34,6 @@ LDFLAGS:append = " -lm"
|
|||||||
|
|
||||||
CXXFLAGS:append:toolchain-clang = " -Wno-error=dtor-typedef"
|
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"
|
BINCONFIG = "${bindir}/directfb-config"
|
||||||
|
|
||||||
inherit autotools binconfig-disabled pkgconfig
|
inherit autotools binconfig-disabled pkgconfig
|
||||||
|
|||||||
@ -58,7 +58,3 @@ EXTRA_OECONF = "--with-user= \
|
|||||||
--with-thin-repair=${sbindir}/thin_repair \
|
--with-thin-repair=${sbindir}/thin_repair \
|
||||||
--with-thin-restore=${sbindir}/thin_restore \
|
--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)}"
|
|
||||||
|
|||||||
@ -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: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:armv7ve = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}"
|
||||||
|
|
||||||
EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF "
|
# JIT does not work on RISCV
|
||||||
EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF "
|
EXTRA_OECMAKE:append:riscv32 = " -DENABLE_JIT=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 not supported on MIPS either
|
# JIT not supported on MIPS either
|
||||||
EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON "
|
EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON "
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user