[Buildroot] [PATCH] package/net-tools: fix static linking issue with lintl

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat May 28 17:30:55 UTC 2016


Hello,

On Sat, 28 May 2016 16:02:51 +0200, Romain Naour wrote:
> When net-tools are build with uClibc-ng and statically linked,
> some tools like hostname and route needs to link with -lintl.
> 
> Adding -lintl in LDFLAGS place the library before object files:
> arm-linux-gcc -O2 -g -Wall -fno-strict-aliasing   -static -lintl -Llib -o hostname hostname.o
> 
> Move $(LDFLAGS) after object files in the Makefile.

Thanks. However, I believe a slightly better fix is to add a $(LIBS)
variable passed after object files, and keep $(LDFLAGS) where it is
today. This is what automake Makefiles are doing, so it seems like the
most "standard way". See for example
https://lists.gnu.org/archive/html/autoconf/2004-01/msg00182.html.

And this way, maybe the patch can be submitted upstream? I see that
upstream has an active Git repository, so such patches could definitely
be upstreamed.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list