[OE-core] glibc and LDFLAGS

Rasmus Villemoes rasmus.villemoes at prevas.dk
Sat Jan 18 22:25:45 UTC 2020


I've added a custom setting to TARGET_LDFLAGS, but then I noticed that
the glibc build ignored that. The glibc do_compile did

 LDFLAGS = ""

for a very long time, with the explanation that "# -Wl,-rpath-link
<staging>/lib in LDFLAGS can cause breakage if another glibc is in
staging". Is that actually still relevant with per-recipe staging?

If that is indeed moot, can we do

         CPPFLAGS="" oe_runconf
 }

+LDFLAGS += "-fuse-ld=bfd"
 do_compile () {
-       # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if
another glibc is in staging
-       LDFLAGS="-fuse-ld=bfd"
        base_do_compile
        echo "Adjust ldd script"
        if [ -n "${RTLDLIST}" ]

?

And if not, at least move the LDFLAGS definition out to recipe level so
"bitbake -e" will show the value actually in effect? (And that would
also allow a .bbappend to tweak glibc's LDFLAGS with my custom setting,
though it's annoying to have to maintain that, so the best is if glibc
can just be built with the global LDFLAGS setting).

Rasmus


More information about the Openembedded-core mailing list