configure: check for --no-as-needed before using (#217)
This commit is contained in:
parent
c3068808a2
commit
21492ca1bf
8
configure
vendored
8
configure
vendored
@ -222,8 +222,6 @@ esac
|
||||
|
||||
# Add CPPFLAGS/CFLAGS/LDFLAGS to CC for testing features
|
||||
XCC="$CC $CFLAGS $CPPFLAGS $LDFLAGS"
|
||||
# Make sure to disable --as-needed for CC tests.
|
||||
XCC="$XCC -Wl,--no-as-needed"
|
||||
|
||||
check_compiler_flag()
|
||||
{
|
||||
@ -259,6 +257,12 @@ EOF
|
||||
return $rv
|
||||
}
|
||||
|
||||
# If supported, make sure to disable --as-needed for CC tests.
|
||||
check_compiler_flag "l,--no-as-needed" W LDFLAGS
|
||||
if [ $? -eq 0 ]; then
|
||||
XCC="$XCC -Wl,--no-as-needed"
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for some compiler warning flags.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user