diff mbox

libbacktrace: add support for --disable-werror

Message ID 201401031419.53696.vapier@gentoo.org
State New
Headers show

Commit Message

Mike Frysinger Jan. 3, 2014, 7:19 p.m. UTC
In the same vein as the other dirs, add a --disable-werror option to the
libbacktrace dir to disable the explicit -Werror usage.

2014-01-03  Mike Frysinger  <dirtyepic@gentoo.org>

	* configure.ac: Add --enable-werror.
	(WARN_FLAGS): Use it.
	* configure: Regenerate.

Comments

Ian Lance Taylor Jan. 4, 2014, 6:56 a.m. UTC | #1
On Fri, Jan 3, 2014 at 11:19 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> In the same vein as the other dirs, add a --disable-werror option to the
> libbacktrace dir to disable the explicit -Werror usage.

As far as I can see most of the target directories do not do this.
And libbacktrace is only turning on -Werror when it is a target
directory.  I'm not necessarily opposed to this, but I question the
premise: this is not like the other dirs, this is something new.

Ian



> 2014-01-03  Mike Frysinger  <dirtyepic@gentoo.org>
>
>         * configure.ac: Add --enable-werror.
>         (WARN_FLAGS): Use it.
>         * configure: Regenerate.
>
> --- a/libbacktrace/configure.ac
> +++ a/libbacktrace/configure.ac
> @@ -132,8 +132,13 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwri
>                           -Wmissing-format-attribute -Wcast-qual],
>                           [WARN_FLAGS])
>
> +AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
> +                                      [turns on -Werror @<:@default=yes@:>@])])
> +
>  if test -n "${with_target_subdir}"; then
> -  WARN_FLAGS="$WARN_FLAGS -Werror"
> +  if test "x$enable_werror" != "xno"; then
> +    WARN_FLAGS="$WARN_FLAGS -Werror"
> +  fi
>  fi
>
>  AC_SUBST(WARN_FLAGS)
> --- a/libbacktrace/configure
> +++ a/libbacktrace/configure
> @@ -730,6 +730,7 @@ enable_fast_install
>  with_gnu_ld
>  enable_libtool_lock
>  enable_multilib
> +enable_werror
>  with_system_libunwind
>  '
>        ac_precious_vars='build_alias
> @@ -1370,6 +1371,7 @@ Optional Features:
>                            optimize for fast installation [default=yes]
>    --disable-libtool-lock  avoid locking (might break parallel builds)
>    --enable-multilib       build many library versions (default)
> +  --enable-werror         turns on -Werror [default=yes]
>
>  Optional Packages:
>    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
> @@ -11614,8 +11616,16 @@ fi
>  CFLAGS="$save_CFLAGS"
>
>
> +# Check whether --enable-werror was given.
> +if test "${enable_werror+set}" = set; then :
> +  enableval=$enable_werror;
> +fi
> +
> +
>  if test -n "${with_target_subdir}"; then
> -  WARN_FLAGS="$WARN_FLAGS -Werror"
> +  if test "x$enable_werror" != "xno"; then
> +    WARN_FLAGS="$WARN_FLAGS -Werror"
> +  fi
>  fi
>
>
diff mbox

Patch

--- a/libbacktrace/configure.ac
+++ a/libbacktrace/configure.ac
@@ -132,8 +132,13 @@  ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwri
 			  -Wmissing-format-attribute -Wcast-qual],
 			  [WARN_FLAGS])
 
+AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
+                                      [turns on -Werror @<:@default=yes@:>@])])
+
 if test -n "${with_target_subdir}"; then
-  WARN_FLAGS="$WARN_FLAGS -Werror"
+  if test "x$enable_werror" != "xno"; then
+    WARN_FLAGS="$WARN_FLAGS -Werror"
+  fi
 fi
 
 AC_SUBST(WARN_FLAGS)
--- a/libbacktrace/configure
+++ a/libbacktrace/configure
@@ -730,6 +730,7 @@  enable_fast_install
 with_gnu_ld
 enable_libtool_lock
 enable_multilib
+enable_werror
 with_system_libunwind
 '
       ac_precious_vars='build_alias
@@ -1370,6 +1371,7 @@  Optional Features:
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-multilib       build many library versions (default)
+  --enable-werror         turns on -Werror [default=yes]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -11614,8 +11616,16 @@  fi
 CFLAGS="$save_CFLAGS"
 
 
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;
+fi
+
+
 if test -n "${with_target_subdir}"; then
-  WARN_FLAGS="$WARN_FLAGS -Werror"
+  if test "x$enable_werror" != "xno"; then
+    WARN_FLAGS="$WARN_FLAGS -Werror"
+  fi
 fi