mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-08-14 16:35:16 +00:00
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>
This commit is contained in:
parent
bc81a983b7
commit
31d5c4ae9e
@ -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`
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user