Turn off --no-undefined on OpenBSD again. Leave it on everywhere else for now.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
diff --git a/configure b/configure
index d6b9b29..d5bcc80 100755
--- a/configure
+++ b/configure
@@ -15953,9 +15953,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --no-undefined" >&5
$as_echo_n "checking for linker option --no-undefined... " >&6; }
have_no_undefined=no
-save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS -Wl,--no-undefined"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+case "$host" in
+ *-*-openbsd*)
+ ;;
+
+ *)
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--no-undefined"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15970,13 +15975,15 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
-have_no_undefined=yes
-EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
+ have_no_undefined=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
fi
rm -f core conftest.err conftest.$ac_objext \
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 "$have_no_undefined" >&6; }
diff --git a/configure.in b/configure.in
index 100d6b2..993964f 100644
--- a/configure.in
+++ b/configure.in
@@ -206,15 +206,23 @@ 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"
+case "$host" in
+ dnl Skip this on platforms where it is just simply busted.
+ *-*-openbsd*)
+ ;;
+
+ *)
+ 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"
+ ;;
+esac
AC_MSG_RESULT($have_no_undefined)
dnl See whether we are allowed to use the system C library