diff options
author | Alex Rønne Petersen <alexrp@xamarin.com> | 2014-06-10 11:34:01 +0400 |
---|---|---|
committer | Alex Rønne Petersen <alexrp@xamarin.com> | 2014-06-10 11:35:01 +0400 |
commit | be483f24daa3ee3076ab198cc1bc22b1cdef3b62 (patch) | |
tree | 1d97ab9a9162004dd2d264ad45c7260f1a0ae953 /libgc | |
parent | be195eb1e66f7be27b8ee9fc216da3b32d5f4262 (diff) |
Add build system plumbing for building with -Werror.
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/Makefile.am | 2 | ||||
-rw-r--r-- | libgc/configure.ac | 6 |
2 files changed, 7 insertions, 1 deletions
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 |