summaryrefslogblamecommitdiff
path: root/user/dracut/fts.patch
blob: f2bbb03b7335c6cd29fe83e07b22ad3b85947e55 (plain) (tree)





























                                                                       
From 7f6517b7dc3f3d160ae43de43d1184b137c0c96f Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Sun, 5 Apr 2020 04:52:19 -0500
Subject: [PATCH] configure: Find FTS library with --as-needed

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 3f724ef2..aceec138 100755
--- 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"
-- 
2.25.1