diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a7698f484..0a6bdd1d7 100644 --- a/configure.ac +++ b/configure.ac @@ -330,7 +330,21 @@ LDFLAGS="$LDFLAGS -g" AM_CONDITIONAL([DEV_BUILD], [test "$enable_dev_build" = "yes"]) +dnl -fms-extensions causes clang to have a built-in __wchar_t on OpenBSD, +dnl which just straight up breaks compiling any code. +dnl (2022-04-04 / OpenBSD 7 / clang 11.1.0) +AH_VERBATIM([OpenBSD], [ +#ifdef __OpenBSD__ +#define __wchar_t __wchar_t_ignore +#include <stdint.h> +#undef __wchar_t +#endif +]) + dnl always want these CFLAGS +AC_C_FLAG([-fms-extensions], [ + AC_MSG_ERROR([$CC does not support unnamed struct fields (-fms-extensions)]) +]) AC_C_FLAG([-fno-omit-frame-pointer]) AC_C_FLAG([-funwind-tables]) AC_C_FLAG([-Wall]) |