@@ -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
@@ -55,6 +57,13 @@ do_configure:prepend() {
fi
}
+do_configure:prepend() {
+ 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() {
oe_runmake PREFIX=${prefix} DESTDIR=${D} \
INST_TESTSDIR32=${libdir}/libhugetlbfs/tests \
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> --- v2: Keep the gold hack intact .../recipes-benchmark/libhugetlbfs/libhugetlbfs_2.24.bb | 9 +++++++++ 1 file changed, 9 insertions(+)