Commit 218e8144 by Fabrice Fontaine

lxc: fix build with --disable-werror

Fix #2592 by defining -Wvla -std=gnu11 even if --disable-werror is set As -std=gnu11 is always set, bump requirement on gcc from 4.6 to 4.7 (see https://gcc.gnu.org/projects/cxx-status.html#cxx11) Signed-off-by: 's avatarFabrice Fontaine <fontaine.fabrice@gmail.com>
parent 0b26d75e
...@@ -53,7 +53,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ...@@ -53,7 +53,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define CLANG_VERSION \ #define CLANG_VERSION \
(__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#if GCC_VERSION < 40600 && CLANG_VERSION < 10000 #if GCC_VERSION < 40700 && CLANG_VERSION < 10000
#error Sorry, your compiler is too old - please upgrade it #error Sorry, your compiler is too old - please upgrade it
#endif #endif
]])], [valid_compiler=yes], [valid_compiler=no]) ]])], [valid_compiler=yes], [valid_compiler=no])
...@@ -683,8 +683,9 @@ AC_PROG_SED ...@@ -683,8 +683,9 @@ AC_PROG_SED
# See if we support thread-local storage. # See if we support thread-local storage.
LXC_CHECK_TLS LXC_CHECK_TLS
CFLAGS="$CFLAGS -Wvla -std=gnu11"
if test "x$enable_werror" = "xyes"; then if test "x$enable_werror" = "xyes"; then
CFLAGS="$CFLAGS -Werror -Wvla -std=gnu11" CFLAGS="$CFLAGS -Werror"
fi fi
AC_ARG_ENABLE([thread-safety], AC_ARG_ENABLE([thread-safety],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment