SHA256
1
0
forked from pool/mstflint
mstflint/Fix-gcc7-and-gcc8.patch

34 lines
1.3 KiB
Diff
Raw Normal View History

commit 6bc135ffb198d601e9c4e3be615f13a98640610b
Author: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
Date: Wed Aug 9 17:31:57 2017 +0200
Fix gcc7 and gcc8
Fix compilation errors for GCC7 and GCC8
Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
diff --git configure.ac configure.ac
index 5a410606edcc..d76f6ae6df43 100644
--- configure.ac
+++ configure.ac
@@ -164,14 +164,15 @@ AS_IF([test "x$enable_dynamic_ld" = "xyes"], [
])
CFLAGS="$CFLAGS -Werror -DMST_UL"
+CPPFLAGS="$CPPFLAGS -DMST_UL"
CXXFLAGS="$CXXFLAGS -Werror -DMST_UL"
AC_CONFIG_FILES( mstflint.spec )
# C related ignores
-AX_CHECK_COMPILE_FLAG([-Wno-format-overflow], [CFLAGS="$CFLAGS -Wno-format-overflow"], [], [])
-AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CFLAGS="$CFLAGS -Wno-implicit-fallthrough"], [], [])
-AX_CHECK_COMPILE_FLAG([-Wno-cast-function-type], [CFLAGS="$CFLAGS -Wno-cast-function-type"], [], [])
+AX_CHECK_COMPILE_FLAG([-Wno-format-overflow], [CPPFLAGS="$CPPFLAGS -Wno-format-overflow"], [], [])
+AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CPPFLAGS="$CPPFLAGS -Wno-implicit-fallthrough"], [], [])
+AX_CHECK_COMPILE_FLAG([-Wno-cast-function-type], [CPPFLAGS="$CPPFLAGS -Wno-cast-function-type"], [], [])
# C++ related ignores
AC_LANG_PUSH([C++])