1 From 1e9bb2fba94bc508659f1667bf95501324849bb9 Mon Sep 17 00:00:00 2001
2 From: "Yann E. MORIN" <yann.morin.1998@free.fr>
3 Date: Sun, 26 Feb 2017 12:04:54 +0100
4 Subject: [PATCH] build: add EXTRALIBS to link with
6 When doing a uClibc static build, the build fails to link:
7 http://autobuild.buildroot.org/results/503/50314716a9f72e8bb238e52e9dc342c68f7e0b8b/build-end.log
10 - xfsprogs links dome programs with util-linux' libblkid
11 - util-linux' libblkid is linked to util-linux' libuuid
12 - util-linux' libuuid uses i18n functions when locales are enabled
13 - uClibc does not provide i18n functions
14 - i18n functions are provided by libintl from libintl from gettext
16 util-linux installs pkg-config files for thos two libs. However,
17 xfsprogs does not use pkg-config to find libblkid or libuuid, thus it
18 misses the Libs.private field from libuid.
20 In this case, it is necessary to pass LIBS=-lintl at configure time, so
21 that configure correctly finds libblkid.
23 Still, this is not enough, because the build will not use LIBS during
26 We fix that last bit by adding EXTRALIBS to the libraries to link with,
27 so that it is possible to pass EXTRALIBS=-lintl at build time:
29 $ ./configure [...] LIBS=-lintl
30 $ make EXTRALIBS=-lintl
32 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
33 Cc: Waldemar Brodkorb <wbx@openadk.org>
35 include/buildmacros | 2 +-
36 1 file changed, 1 insertion(+), 1 deletion(-)
38 diff --git a/include/buildmacros b/include/buildmacros
39 index a7c5d8a..dd62d80 100644
40 --- a/include/buildmacros
41 +++ b/include/buildmacros
42 @@ -11,7 +11,7 @@ BUILDRULES = $(TOPDIR)/include/buildrules
44 LDFLAGS += $(LOADERFLAGS) $(LLDFLAGS)
45 LTLDFLAGS += $(LOADERFLAGS)
46 -LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB)
47 +LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB) $(EXTRALIBS)
49 MAKEOPTS = --no-print-directory Q=$(Q)
50 SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)