Bug 14846

Summary: quoting causes only first lib in CONFIG_EXTRA_LDLIBS to be taken
Product: Busybox Reporter: Arkadiusz Miskiewicz <arekm>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.35.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: fix

Description Arkadiusz Miskiewicz 2022-06-15 08:19:49 UTC
Commit

commit 1f9ed02caffb269e5fc6fbdf19fc9ba05a79e628
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Tue Feb 23 23:09:49 2021 +0100

    trylink: do not drop libs from CONFIG_EXTRA_LDLIBS

removed (by not putting it in new place)

-ifneq ($(CONFIG_EXTRA_LDLIBS),)
-LDLIBS += $(strip $(subst ",,$(CONFIG_EXTRA_LDLIBS)))
-#"))
-endif

which was stripping "" from CONFIG_EXTRA_LDLIBS and now we get this:

.../busybox-1.35.0/scripts/trylink "busybox_unstripped" "x86_64-pld-linux-gnux32-gcc" "-malign-data=abi ..." " applets/built-in.o" " archival/lib.a  ar ...id/built-in.o" "m crypt rt" ""tirpc pthread gssapi"" && /home/users/arekm/rpm/BUILD-x32/busybox-1.35.0/scripts/generate_BUFSIZ.sh --post include/common_bufsiz.h

note the double quoting of ""tirpc pthread gssapi"". Then  script/trylink does:

CONFIG_EXTRA_LDLIBS="$8"

which will be only 

+ CONFIG_EXTRA_LDLIBS=tirpc

missing pthread and gssapi.
Comment 1 Arkadiusz Miskiewicz 2022-06-15 08:21:39 UTC
Created attachment 9321 [details]
fix