Use the --no-undefined linker option if it's available, which will catch references to undefined functions which could fail at runtime.
This commit is contained in:
parent
44c73030e2
commit
f89cf7c725
2 changed files with 213 additions and 177 deletions
13
configure.in
13
configure.in
|
@ -180,6 +180,19 @@ if test x$enable_dependency_tracking = xyes; then
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for linker option --no-undefined)
|
||||
have_no_undefined=no
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--no-undefined"
|
||||
AC_TRY_LINK([
|
||||
],[
|
||||
],[
|
||||
have_no_undefined=yes
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
|
||||
])
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
AC_MSG_RESULT($have_no_undefined)
|
||||
|
||||
dnl See whether we are allowed to use the system C library
|
||||
AC_ARG_ENABLE(libc,
|
||||
AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue