From: Michael Tokarev
> Sent: 31 December 2022 09:44
>
> 31.12.2022 11:48, Ron Yorston wrote:
> > Commit 77216c368 (Fix non-Linux builds) made linking with libresolv
> > conditional on the output of 'gcc -dumpmachine' containing 'gnu'.
> >
> > This broke builds on Red Hat systems (Fedora, RHEL) and derivatives
> > (CentOS, Rocky). Such systems report a machine type of the form
> > 'x86_64-redhat-linux'.
> >
> > Check for 'linux' as well as 'gnu'.
>
> This is - in my opinion - both wrong test to begin with, and a wrong
> fix. -lresolv is needed when nslookup applet is enabled, because it
> uses res_XXX functions, - this is regardless of the system, I think.
> I submitted a patch about this a few months ago. If anything, this
> can be made a test whenever we actually have and need -lresolv by
> doing a small compile test.
You don't need to check whether libresolv is needed just whether
it exists.
The linker won't (usually) add the NEEDED entry unless the library
actually defines some undefined symbols.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT,
UK
Registration No: 1397386 (Wales)
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox