summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2022-04-20 13:51:45 +0200
committerGitHub <noreply@github.com>2022-04-20 13:51:45 +0200
commita71e190d44395ab119579dacd4d86d2a2dfa9916 (patch)
tree62cc9f42e4650c5a8b6b759da439d1ee132c7a51 /configure.ac
parentMerge pull request #11052 from opensourcerouting/fix/log_dir_permissions (diff)
parentbuild: enable `-fms-extensions` (diff)
downloadfrr-a71e190d44395ab119579dacd4d86d2a2dfa9916.tar.xz
frr-a71e190d44395ab119579dacd4d86d2a2dfa9916.zip
Merge pull request #10961 from opensourcerouting/build-ms-ext
build: enable `-fms-extensions`
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
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])