Fixes: #13829 - Overlinking Lua and Python bindings
Reported-by: Petr Pisar <ppisar@redhat.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
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
-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])