summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-10-06 20:18:40 -0700
committerKhem Raj <raj.khem@gmail.com>2024-11-19 13:13:26 -0800
commit31d5c4ae9ed1800176b6ca53e61f9162af02a8c3 (patch)
tree9dfcfc849db9fd91d617911117855aaa9f5051d7
parentbc81a983b794e112d56f05765f08da85ecfef1da (diff)
downloadmeta-openembedded-31d5c4ae9ed1800176b6ca53e61f9162af02a8c3.tar.gz
libhugetlbfs: Use linker wrapper during build
ld.hugetlbfs is munging certain linker commandline options and presenting a differently named options to its users, in summary its expecting linker process to call ld.hugetlbfs which calls the final linker with additional decorations. This patch makes space for that by adding -B option to compiler so it finds this the linker in S and then we creates symlinks for linker name that clang/gcc are expecting. Fixes libhugetlbfs/2.24/recipe-sysroot-native/usr/bin/x86_64-yoe-linux/x86_64-yoe-linux-ld.bfd: unrecognized option '--hugetlbfs-link=B' Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit dc84a9e699caa852adc043e9ba1eb134880f055d) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
index 00b34ad4ab..aa1c0ddd5e 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb
@@ -46,6 +46,8 @@ export HUGETLB_LDSCRIPT_PATH="${S}/ldscripts"
46 46
47TARGET_CC_ARCH += "${LDFLAGS}" 47TARGET_CC_ARCH += "${LDFLAGS}"
48 48
49LDFLAGS += "-B${S}"
50
49inherit autotools-brokensep cpan-base 51inherit autotools-brokensep cpan-base
50 52
51#The CUSTOM_LDSCRIPTS doesn't work with the gold linker 53#The CUSTOM_LDSCRIPTS doesn't work with the gold linker
@@ -53,6 +55,11 @@ do_configure:prepend() {
53 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then 55 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
54 sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile.in 56 sed -i 's/CUSTOM_LDSCRIPTS = yes/CUSTOM_LDSCRIPTS = no/' Makefile.in
55 fi 57 fi
58
59 ln -sf ld.hugetlbfs ${S}/ld
60 ln -sf ld.hugetlbfs ${S}/ld.bfd
61 ln -sf ld.hugetlbfs ${S}/ld.gold
62 ln -sf ld.hugetlbfs ${S}/ld.lld
56} 63}
57 64
58do_install() { 65do_install() {
@@ -61,7 +68,8 @@ do_install() {
61 INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \ 68 INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \
62 install-tests 69 install-tests
63 70
64 sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' \ 71 sed -i \
72 -e 's|${RECIPE_SYSROOT_NATIVE}||g' \
65 -e 's|${RECIPE_SYSROOT}||g' \ 73 -e 's|${RECIPE_SYSROOT}||g' \
66 `find ${D}${libdir}/libhugetlbfs/tests -name dummy.ldscript` 74 `find ${D}${libdir}/libhugetlbfs/tests -name dummy.ldscript`
67} 75}