package/xfsprogs: fix static build
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 26 Feb 2017 11:19:03 +0000 (12:19 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Feb 2017 13:31:58 +0000 (14:31 +0100)
commit779ec7f36dfb85c43c093ec5a19116399bcd3252
treed83487b103d6e0ee9b5fe03cce86e31e155ed2d1
parentbe8177fcea62a3ea1a3c3e870b0da3b600f092ce
package/xfsprogs: fix static build

xfsprogs links to some libraries from util-linux. Those in turn may use
i18n functions when locales are enabled.

When doing a uClibc build, those i18n functions are provided by the
libintl library from the gettext package.

xfsprogs does not use pkgconfig to find the util-linux libraries, so it
misses the Requires.private field from libblkid, and thus misses the
Libs.private field from libuid.

And so a static link fails because of undefined references to i18n
symbols.

Furthermore, xfsprogs does not use automake; the hand-made Makefiles do
not make use of the LIBS variable set by configure.

We fix that in two ways:

  - pass LIBS=-lintl to configure, so that the configure step has a
    chance to succeed  (as suggested by Waldemar)

  - patch a Makefile to link with EXTRALIBS, and pass EXTRALIBS via
    XFSPROGS_MAKE_OPTS

Fixes:
    http://autobuild.buildroot.org/results/503/50314716a9f72e8bb238e52e9dc342c68f7e0b8b/
    http://autobuild.buildroot.org/results/253/253a024698b55dece992b2631e30edf4ff9092f7/
    http://autobuild.buildroot.org/results/3fe/3fe0d96cf13af12b0051a95f7865d4e38f4a78af/
    http://autobuild.buildroot.org/results/d48/d48e61785d25d33106b7dab1b5cb200cf27d4044/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/xfsprogs/0004-build-add-EXTRALIBS-to-link-with.patch [new file with mode: 0644]
package/xfsprogs/xfsprogs.mk