From: Khem Raj <[email protected]> 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 <[email protected]> (cherry picked from commit dc84a9e699caa852adc043e9ba1eb134880f055d) Signed-off-by: Armin Kuster <[email protected]> --- .../libhugetlbfs/libhugetlbfs_2.24.bb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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" TARGET_CC_ARCH += "${LDFLAGS}" +LDFLAGS += "-B${S}" + inherit autotools-brokensep cpan-base #The CUSTOM_LDSCRIPTS doesn't work with the gold linker @@ -53,6 +55,11 @@ 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 } do_install() { @@ -61,7 +68,8 @@ do_install() { INST_TESTSDIR64=${libdir}/libhugetlbfs/tests \ install-tests - sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' \ + sed -i \ + -e 's|${RECIPE_SYSROOT_NATIVE}||g' \ -e 's|${RECIPE_SYSROOT}||g' \ `find ${D}${libdir}/libhugetlbfs/tests -name dummy.ldscript` } -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#113484): https://lists.openembedded.org/g/openembedded-devel/message/113484 Mute This Topic: https://lists.openembedded.org/mt/109406603/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
