]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: do not do any dynamic linking of libtool libraries
authorRomain Naour <romain.naour@openwide.fr>
Thu, 5 Feb 2015 23:35:13 +0000 (10:35 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 5 Feb 2015 23:35:13 +0000 (10:35 +1100)
commitece49daeff1a3cad765e106d678c608925c9d768
tree48856331e4b4b0184886ba8de9f7d2dd541c0744
parent48e75fb61d54962b1838a018e682742d2c920911
xfsprogs: do not do any dynamic linking of libtool libraries

if --disable-static and --enable-shared are given on the command
line, the link with xfsprogs's internal libraries fail because
they have been dynamically compiled.

Hence the following error:
ld: attempted static link of dynamic object `../libxcmd/.libs/libxcmd.so'

xfsprogs rely on the original behaviour of -static which was modified in
Buildroot by [1].  But since commit [2] the build of xfsprogs tools is broken
because they try to link statically with the static libuuid library
(util-linux), which is not build for shared only build.

The use of -static-libtool-libs allows to fallback to the dynamic linking for
libuuid only:

LD_TRACE_LOADED_OBJECTS=1 xfs_copy
linux-gate.so.1 =>  (0xf7793000)
libuuid.so.1 => /lib/libuuid.so.1 (0x465e1000)
libpthread.so.0 => /lib/libpthread.so.0 (0x46db1000)
librt.so.1 => /lib/librt.so.1 (0x46f21000)
libc.so.6 => /lib/libc.so.6 (0x46bf1000)
/lib/ld-linux.so.2 (0x46bce000)

[1] http://git.buildroot.net/buildroot/commit/?id=97703978ac870ce2b14ad144f8e082de82aa2c64
[2] http://git.buildroot.net/buildroot/commit/?id=f1d3e09895b245da9d54bbaef36e5de95269034e

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
copy/Makefile
db/Makefile
growfs/Makefile
io/Makefile
logprint/Makefile
mkfs/Makefile
repair/Makefile