forked from pool/mstflint
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
|
commit eff41e6dc73e6f38e50296d1579372f7527fb84b
|
||
|
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 1aa9d36d5356..ca08a19c8805 100644
|
||
|
--- configure.ac
|
||
|
+++ configure.ac
|
||
|
@@ -164,16 +164,21 @@ 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 )
|
||
|
|
||
|
#Check for new ignore flags needed for GCC >= 7
|
||
|
+AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CPPFLAGS="$CPPFLAGS -Wno-implicit-fallthrough"], [], [])
|
||
|
+AX_CHECK_COMPILE_FLAG([-Wno-format-overflow], [CPPFLAGS="$CPPFLAGS -Wno-format-overflow"], [], [])
|
||
|
+AX_CHECK_COMPILE_FLAG([-Wno-cast-function-type], [CPPFLAGS="$CPPFLAGS -Wno-cast-function-type"], [], [])
|
||
|
+
|
||
|
+AC_LANG_PUSH([C++])
|
||
|
AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CXXFLAGS="$CXXFLAGS -Wno-implicit-fallthrough"], [], [])
|
||
|
-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-format-overflow], [CXXFLAGS="$CXXFLAGS -Wno-format-overflow"], [], [])
|
||
|
-
|
||
|
+AX_CHECK_COMPILE_FLAG([-Wno-class-memaccess], [CXXFLAGS="$CXXFLAGS -Wno-class-memaccess"], [], [])
|
||
|
+AC_LANG_POP([C++])
|
||
|
|
||
|
TOOLS_BUILD_TIME=`date +"%b %d %Y\, %H:%M:%S"`
|
||
|
AC_SUBST(TOOLS_BUILD_TIME)
|