summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-06-10 08:50:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-13 22:10:32 +0100
commit616f694b72c4445648de24850a06e4e8d90d64b2 (patch)
treec2df42fceea00da7fb836579a747690dd1f8e668 /meta/recipes-core/glibc
parent44f23725b070617b5715dee2bf784e78265f4ddf (diff)
downloadpoky-616f694b72c4445648de24850a06e4e8d90d64b2.tar.gz
glibc: Pass linker choice via compiler flags
glibc configury tries to detect ld version and assumes BFD or gold linker but when system ld is pointing to lld or mold it might fail the linker check, therefore pass LD variable to explicitly point at ld.bfd we are using BFD linker only to link glibc after all. Second problem in such a case is that some partial objects are linked with CC -r which will fail if we do not inform the compiler to use BFD linker thusly pass it via appending to CC variable (From OE-Core rev: 63248d2cbd7a15aec5b864d0058fe919eb17c46c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc')
-rw-r--r--meta/recipes-core/glibc/glibc_2.37.bb4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/glibc/glibc_2.37.bb b/meta/recipes-core/glibc/glibc_2.37.bb
index b27f98fb19..3387441cad 100644
--- a/meta/recipes-core/glibc/glibc_2.37.bb
+++ b/meta/recipes-core/glibc/glibc_2.37.bb
@@ -103,10 +103,12 @@ do_configure () {
103# version check and doesn't really help with anything 103# version check and doesn't really help with anything
104 (cd ${S} && gnu-configize) || die "failure in running gnu-configize" 104 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
105 find ${S} -name "configure" | xargs touch 105 find ${S} -name "configure" | xargs touch
106 CPPFLAGS="" oe_runconf 106 CPPFLAGS="" LD="${HOST_PREFIX}ld.bfd ${TOOLCHAIN_OPTIONS}" oe_runconf
107} 107}
108 108
109LDFLAGS += "-fuse-ld=bfd" 109LDFLAGS += "-fuse-ld=bfd"
110CC += "-fuse-ld=bfd"
111
110do_compile () { 112do_compile () {
111 base_do_compile 113 base_do_compile
112 echo "Adjust ldd script" 114 echo "Adjust ldd script"