summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark/libhugetlbfs
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-10-08 22:45:49 -0700
commitdc84a9e699caa852adc043e9ba1eb134880f055d (patch)
treeebb7012230cdfdf92bf9ba993b81363e561ddd38 /meta-oe/recipes-benchmark/libhugetlbfs
parent47ee82f0842bbd3f150fb47821fedb376ec77f30 (diff)
downloadmeta-openembedded-dc84a9e699caa852adc043e9ba1eb134880f055d.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>
Diffstat (limited to 'meta-oe/recipes-benchmark/libhugetlbfs')
-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 00b34ad4a..aa1c0ddd5 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}