diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2022-04-20 07:51:45 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-20 07:51:45 -0400 | 
| commit | a71e190d44395ab119579dacd4d86d2a2dfa9916 (patch) | |
| tree | 62cc9f42e4650c5a8b6b759da439d1ee132c7a51 /configure.ac | |
| parent | 83bbdb5e145b84000ceb34ed80873009d1c5ba2c (diff) | |
| parent | 3f115705d3f449dd19ab9a93170d6cd72a50f999 (diff) | |
Merge pull request #10961 from opensourcerouting/build-ms-ext
build: enable `-fms-extensions`
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 a7698f484c..0a6bdd1d73 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])  | 
