On Tue, Feb 23, 2021 at 12:44 PM Denys Vlasenko <vda.li...@googlemail.com> wrote: > On Sat, Feb 13, 2021 at 3:23 PM Laurent Bercot <ska-dietl...@skarnet.org> > wrote: > > An example is utmp functionality with the musl C library: musl > > provides utmpx.h stubs that do nothing, and the utmps library > > ( https://skarnet.org/software/utmps/ ) can be used to implement > > real utmp functionality on top of musl - but at the moment, busybox > > cannot be built with utmps, because trylink sees that it links > > without the "utmps skarnet" arguments (which it reorders as > > "-lskarnet -lutmps" due to the call to "sort" mentioned above, which > > would be incorrect even if it kept them), removes them, and makes it > > impossible to have the desired utmps functionality in the busybox > > binary.
> The logic to remove libs which are not necessary simplifies cases > where e.g. -lrt or -lm is necessary on one libc, but not on other. > (Some newly created libc's include them into main library, and > libm is just an empty archive, kept to not break link invocations > with -lm. Google, as usual, decided to be a pain and Android has no > separate crypt library and they did NOT retain a stub empty archive!). > > With current logic, you do not need to jump through the hoops > "if FEATURE_AWK_LIBM=y, include -lm, but if it's musl, do not include -lm". > Just LDLIBS += m, always. > > Maybe we can have LDLIBS_MANDATORY for libs which should not be elided? Aha. We have CONFIG_EXTRA_LDLIBS. We just need to change the logic so that it is not appended to LDLIBS, but treated separately, with no elision. _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox