Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -78,24 +78,10 @@ AC_PROG_INSTALL AC_PROG_EGREP BUILDSYS_CHECK_IOS -case "$host" in - dnl OpenBSD 6.2 switched to clang for i386 and AMD64, and clang does no - dnl longer link in libgcc. Unwinding is unfortunately in libc++abi, so - dnl we need that. We add -pthread as libc++abi requires threads. - i386-*-openbsd6.[[23456789]] | i386-*-openbsd[[789]].* | \ - x86_64-*-openbsd6.[[23456789]] | x86_64-*-openbsd[[789]].*) - case "$OBJC" in - *clang*) - LIBS="$LIBS -lc++abi -pthread" - ;; - esac - ;; -esac - AC_ARG_WITH(wii, AS_HELP_STRING([--with-wii], [build for Wii])) AS_IF([test x"$with_wii" = x"yes"], [ AS_IF([test x"$DEVKITPRO" = x""], [ AC_MSG_ERROR([DEVKITPRO is not set! Please set DEVKITPRO.]) @@ -469,10 +455,18 @@ AC_MSG_RESULT($exception_type) ], [ AC_MSG_RESULT(exceptions unavailable!) AC_MSG_ERROR([Exceptions not accepted by compiler!]) ]) + + AC_CHECK_FUNC(_Unwind_RaiseException, [], [ + AC_CHECK_LIB(c++, _Unwind_RaiseException, [ + LIBS="-lc++ -lc++abi -lpthread $LIBS" + ], [ + AC_MSG_ERROR([_Unwind_RaiseException missing!]) + ], [-lc++abi -lpthread]) + ]) AC_CHECK_FUNCS(_Unwind_GetDataRelBase _Unwind_GetTextRelBase) ;; "Apple runtime") AC_DEFINE(OF_APPLE_RUNTIME, 1,