2
1

0001-configure-add-disable-werror.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From e9f34eb4e25fc18411121c4e55557530ddc1f49c Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= <jezz@sysmic.org>
  3. Date: Sun, 4 Sep 2016 09:35:44 +0200
  4. Subject: [PATCH] configure: add --disable-werror
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. -Werror may break builds on some scenarios with trivialities
  9. (especially during developments).
  10. Upstream status: accepted (https://github.com/lxc/lxc/pull/1168)
  11. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
  12. ---
  13. configure.ac | 10 +++++++++-
  14. 1 file changed, 9 insertions(+), 1 deletion(-)
  15. diff --git a/configure.ac b/configure.ac
  16. index 39e313a..0103579 100644
  17. --- a/configure.ac
  18. +++ b/configure.ac
  19. @@ -152,6 +152,11 @@ if test "x$with_systemdsystemunitdir" != "xno"; then
  20. AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
  21. fi
  22. +AC_ARG_ENABLE([werror],
  23. + [AC_HELP_STRING([--disable-werror],
  24. + [do not treat warnings as errors])],
  25. + [], [enable_werror=yes])
  26. +
  27. # Allow enabling deprecated executables
  28. AC_ARG_ENABLE([deprecated],
  29. [AC_HELP_STRING([--enable-deprecated],
  30. @@ -630,7 +635,10 @@ AC_PROG_SED
  31. LXC_CHECK_TLS
  32. if test "x$GCC" = "xyes"; then
  33. - CFLAGS="$CFLAGS -Wall -Werror"
  34. + CFLAGS="$CFLAGS -Wall"
  35. + if test "x$enable_werror" = "xyes"; then
  36. + CFLAGS="$CFLAGS -Werror"
  37. + fi
  38. fi
  39. # Files requiring some variable expansion
  40. --
  41. 2.8.1