diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2022-04-04 14:28:30 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2022-04-04 18:33:10 +0200 |
commit | 3f115705d3f449dd19ab9a93170d6cd72a50f999 (patch) | |
tree | 5c91634b6a06580725efa53301b0a8e3061b1fc9 /configure.ac | |
parent | build: first header *must* be zebra.h or config.h (diff) | |
download | frr-3f115705d3f449dd19ab9a93170d6cd72a50f999.tar.xz frr-3f115705d3f449dd19ab9a93170d6cd72a50f999.zip |
build: enable `-fms-extensions`
This eases incorporating fields from/"subclassing" another struct.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
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 c636fade7..00cd1efdd 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]) |