Commit 4a7e068b authored by Mans Rullgard's avatar Mans Rullgard

configure: check for --as-needed support early

This moves the check for --as-needed linker support before all
library tests, ensuring consistent behaviour between the checks
and the actual link step.
Signed-off-by: default avatarMans Rullgard <>
parent 2d3b21ff
......@@ -2722,6 +2722,8 @@ if enabled asm; then
$nogas "GNU assembler not found, install gas-preprocessor"
check_ldflags -Wl,--as-needed
if check_func dlopen; then
elif check_func dlopen -ldl; then
......@@ -2951,7 +2953,6 @@ enabled extra_warnings && check_cflags -Winline
# add some linker flags
check_ldflags -Wl,--warn-common
check_ldflags -Wl,--as-needed
check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment