Browse Source

configure: Try to add -Wno-incompatible-ms-struct if adding -mms-bitfields

This avoids warnings that are treated as errors by default when building
with clang - warnings like these:

In file included from modules/access/dcp/dcp.cpp:59:
In file included from contrib/x86_64-w64-mingw32/include/AS_DCP.h:88:
In file included from contrib/x86_64-w64-mingw32/include/KM_fileio.h:35:
contrib/x86_64-w64-mingw32/include/KM_util.h:48:11: error: ms_struct may not produce Microsoft-compatible layouts for classes with base classes or virtual functions [-Wincompatible-ms-struct]
    class IntPrinter : public std::string
pull/68/head
Martin Storsjö 9 years ago
parent
commit
89707bdde3
  1. 7
      configure.ac

7
configure.ac

@ -544,6 +544,13 @@ dnl Check for broken versions of mingw-runtime compatability library
AX_CHECK_COMPILE_FLAG([-mms-bitfields], [
AX_APPEND_FLAG([-mms-bitfields], [CFLAGS])
AX_APPEND_FLAG([-mms-bitfields], [CXXFLAGS])
# Check for the warning flag without "-Wno-", GCC accepts
# -Wno-<anything> for unsupported warnings, which can trigger
# other warnings instead.
AX_CHECK_COMPILE_FLAG([-Wincompatible-ms-struct], [
AX_APPEND_FLAG([-Wno-incompatible-ms-struct], [CFLAGS])
AX_APPEND_FLAG([-Wno-incompatible-ms-struct], [CXXFLAGS])
])
], [
AX_CHECK_COMPILE_FLAG([-fnative-struct], [
AX_APPEND_FLAG([-fnative-struct], [CFLAGS])

Loading…
Cancel
Save