]> git.ipfire.org Git - location/libloc.git/commitdiff
configure: Fix passing custom LDFLAGS
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Mar 2025 10:36:50 +0000 (10:36 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Mar 2025 10:36:50 +0000 (10:36 +0000)
Fixes: #13829 - Overlinking Lua and Python bindings
Reported-by: Petr Pisar <ppisar@redhat.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
configure.ac

index e5b4fc587f996e49f6dcc5aa0fb7271d84182fdb..d77cefaac6787a662fa73aa87cab84840e77d841 100644 (file)
@@ -29,15 +29,6 @@ AM_CFLAGS = \
 AM_LDFLAGS = \
        $(OUR_LDFLAGS)
 
-# leaving a space here to work around automake's conditionals
- ifeq ($(OS),Darwin)
-       AM_LDFLAGS += -Wl,-dead_strip
- else
-       AM_LDFLAGS += \
-               -Wl,--as-needed \
-               -Wl,--gc-sections
- endif
-
 LIBLOC_CURRENT=1
 LIBLOC_REVISION=3
 LIBLOC_AGE=0
index 1e040851ec8a19a514d527624e4380ab917fba06..1fae3a336f7a4e9165f9cca56e60c8c25476bab3 100644 (file)
@@ -169,6 +169,10 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
        -fdiagnostics-show-option \
        -fno-common \
 ])
+CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
+       -Wl,--as-needed \
+       -Wl,--gc-sections \
+])
 
 # Enable -fno-semantic-interposition (if available)
 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [-fno-semantic-interposition])