This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] libbacktrace: add support for --disable-werror
- From: Ian Lance Taylor <iant at google dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 3 Jan 2014 22:56:39 -0800
- Subject: Re: [patch] libbacktrace: add support for --disable-werror
- Authentication-results: sourceware.org; auth=none
- References: <201401031419 dot 53696 dot vapier at gentoo dot org>
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
>
>