From be483f24daa3ee3076ab198cc1bc22b1cdef3b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 10 Jun 2014 09:34:01 +0200 Subject: Add build system plumbing for building with -Werror. --- libgc/Makefile.am | 2 +- libgc/configure.ac | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'libgc') diff --git a/libgc/Makefile.am b/libgc/Makefile.am index 49dbe4be81c..a53aafcbf3e 100644 --- a/libgc/Makefile.am +++ b/libgc/Makefile.am @@ -68,7 +68,7 @@ libmonogc_static_la_LDFLAGS = -static EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S -AM_CFLAGS = @GC_CFLAGS@ +AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@ if CPLUSPLUS extra_checks = test_cpp diff --git a/libgc/configure.ac b/libgc/configure.ac index 837e2cb9f15..7dc04985a90 100644 --- a/libgc/configure.ac +++ b/libgc/configure.ac @@ -531,6 +531,12 @@ fi AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet libgc build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes) AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host") +AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no) +if test x$werror_flag = xyes; then + WERROR_CFLAGS="-Werror" +fi +AC_SUBST([WERROR_CFLAGS]) + if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" else -- cgit v1.2.3