From 730c2d3cd98280694b32b80d0cb0f138dcf37638 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 27 Jun 2014 09:02:08 +0000 Subject: [PATCH] Run with -mno-ms-bitfields if the compiler supports it as the ms-bitfields are turned on by default on some hosts, but they are broken https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991 Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3869 --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index a683bfda..8cf01bdf 100644 --- a/configure.ac +++ b/configure.ac @@ -169,6 +169,21 @@ int x=10;if( __builtin_expect ((x==1),0) ) ; #switch language back AC_LANG_POP(C++) +dnl test if compiler supports -mno-ms-bitfields as it is bugged +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991 +BACKUP_CFLAGS="$CFLAGS" +CFLAGS="-mno-ms-bitfields" +AC_MSG_CHECKING(if compiler supports -mno-ms-bitfields) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +void blah(){ +; +} +])],[ +AC_MSG_RESULT([yes]) +CXXFLAGS="$CXXFLAGS -mno-ms-bitfields" +],[AC_MSG_RESULT([no])]) +CFLAGS="$BACKUP_CFLAGS" + dnl enable disable alsa and pass it's cflags to CXXFLAGS AC_ARG_ENABLE(alsa-midi, AC_HELP_STRING([--enable-alsa-midi],[compile with alsa midi support (default yes)]),