Turn off --no-undefined on OpenBSD again. Leave it on everywhere else for now.

main
Ryan C. Gordon 2013-11-16 21:52:56 -05:00
parent 5a68214b7a
commit 923709a699
2 changed files with 30 additions and 15 deletions

19
configure vendored
View File

@ -15953,9 +15953,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --no-undefined" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --no-undefined" >&5
$as_echo_n "checking for linker option --no-undefined... " >&6; } $as_echo_n "checking for linker option --no-undefined... " >&6; }
have_no_undefined=no have_no_undefined=no
save_LDFLAGS="$LDFLAGS" case "$host" in
LDFLAGS="$LDFLAGS -Wl,--no-undefined" *-*-openbsd*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext ;;
*)
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--no-undefined"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
@ -15970,13 +15975,15 @@ main ()
_ACEOF _ACEOF
if ac_fn_c_try_link "$LINENO"; then : if ac_fn_c_try_link "$LINENO"; then :
have_no_undefined=yes have_no_undefined=yes
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
LDFLAGS="$save_LDFLAGS" LDFLAGS="$save_LDFLAGS"
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5
$as_echo "$have_no_undefined" >&6; } $as_echo "$have_no_undefined" >&6; }

View File

@ -206,15 +206,23 @@ fi
AC_MSG_CHECKING(for linker option --no-undefined) AC_MSG_CHECKING(for linker option --no-undefined)
have_no_undefined=no have_no_undefined=no
save_LDFLAGS="$LDFLAGS" case "$host" in
LDFLAGS="$LDFLAGS -Wl,--no-undefined" dnl Skip this on platforms where it is just simply busted.
AC_TRY_LINK([ *-*-openbsd*)
],[ ;;
],[
have_no_undefined=yes *)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" save_LDFLAGS="$LDFLAGS"
]) LDFLAGS="$LDFLAGS -Wl,--no-undefined"
LDFLAGS="$save_LDFLAGS" AC_TRY_LINK([
],[
],[
have_no_undefined=yes
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
])
LDFLAGS="$save_LDFLAGS"
;;
esac
AC_MSG_RESULT($have_no_undefined) AC_MSG_RESULT($have_no_undefined)
dnl See whether we are allowed to use the system C library dnl See whether we are allowed to use the system C library