]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
configure: Find FTS library with --as-needed
authorA. Wilcox <AWilcox@Wilcox-Tech.com>
Sun, 5 Apr 2020 09:52:19 +0000 (04:52 -0500)
committerDaniel Molkentin <daniel@molkentin.de>
Sat, 14 Nov 2020 23:32:14 +0000 (00:32 +0100)
When LDFLAGS contains ``-Wl,--as-needed``, the FTS library will be
ignored if it is specified before the .c source.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Fixes: 62f27ee6f145 ("configure: find cflags and libs for fts on musl")
configure

index 3f724ef220df6a9238eb76ccb3ce00fb19ca7fc3..aceec138443d553611a3700ffa17265b8c099b3a 100755 (executable)
--- a/configure
+++ b/configure
@@ -85,7 +85,7 @@ EOF
 
 found=no
 for lib in "-lc" "-lfts"; do
-       ${CC} $CFLAGS -Wl,$lib $LDFLAGS conftest.c >/dev/null 2>&1
+       ${CC} $CFLAGS $LDFLAGS conftest.c -Wl,$lib >/dev/null 2>&1
        ret=$?
        if test $ret -eq 0; then
                FTS_LIBS="$lib"