aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-07-04 10:38:36 +0200
committerAdrian Frühwirth2018-07-06 09:54:39 +0200
commit42c8212713d5a0b5a60cf5319667c647f7376b8c (patch)
treeb051abd8435c82d888d657ac82771f43d45756ad
parentd516f57561b6426a1b0d1381fd8d67639511e5f9 (diff)
downloadscummvm-rg350-42c8212713d5a0b5a60cf5319667c647f7376b8c.tar.gz
scummvm-rg350-42c8212713d5a0b5a60cf5319667c647f7376b8c.tar.bz2
scummvm-rg350-42c8212713d5a0b5a60cf5319667c647f7376b8c.zip
CONFIGURE: Disable -Wpragma-pack for >=clang-6.0
Clang 6 enables -Wpragma-pack which warns when leaving an included file which changes the current alignment. Our common/pack-{start,end}.h trigger this and it cannot easily and portably be disabled inside pack-{start,end}.h so we disable it globally for now.
-rwxr-xr-xconfigure8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure b/configure
index 9d1265f290..26b89587c5 100755
--- a/configure
+++ b/configure
@@ -1914,6 +1914,14 @@ fi
if test "$have_clang" = yes; then
add_line_to_config_mk 'HAVE_CLANG = 1'
+ _clang_major=`gcc_get_define __clang_major__`
+ #_clang_minor=`gcc_get_define __clang_minor__`
+
+ # clang 6.0 enables -Wpragma-pack which warns when leaving an included file
+ # which changes the current alignment.
+ # Our common/pack-{start,end}.h trigger this and it cannot easily and portably
+ # be disabled inside pack-{start,end}.h so we disable it globally for now.
+ test "$_clang_major" -ge 6 && append_var CXXFLAGS "-Wno-pragma-pack"
# clang does accept all gcc options we use, so we keep have_gcc
fi