Patchwork [libatomic] Add --enable-werror.

login
register
mail settings
Submitter Ryan Hill
Date July 1, 2013, 8:55 p.m.
Message ID <1372712135-8653-1-git-send-email-dirtyepic@gentoo.org>
Download mbox | patch
Permalink /patch/256219/
State New
Headers show

Comments

Ryan Hill - July 1, 2013, 8:55 p.m.
libatomic is currently unconditionally built with -Werror.  This patch adds
--enable-werror to control it (enabled by default).  Bootstrapped and tested
on x86_64, and inspected build logs to ensure it was doing what it should.

I'm assuming copyright assignment isn't necessary for a small change like
this.  I will also need someone to check this in for me please.

gcc/libatomic/
2013-06-30  Ryan Hill  <dirtyepic@gentoo.org>

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

---
 libatomic/configure.ac | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Ryan Hill - July 9, 2013, 2:19 a.m.
On Mon,  1 Jul 2013 14:55:35 -0600
Ryan Hill <dirtyepic@gentoo.org> wrote:

Ping.
http://gcc.gnu.org/ml/gcc-patches/2013-07/msg00032.html

> libatomic is currently unconditionally built with -Werror.  This patch adds
> --enable-werror to control it (enabled by default).  Bootstrapped and tested
> on x86_64, and inspected build logs to ensure it was doing what it should.
> 
> I'm assuming copyright assignment isn't necessary for a small change like
> this.  I will also need someone to check this in for me please.
> 
> gcc/libatomic/
> 2013-06-30  Ryan Hill  <dirtyepic@gentoo.org>
> 
> 	* configure.ac: Add --enable-werror.
> 	(XCFLAGS): Use it.
> 	* configure: Regenerate.
> 
> ---
>  libatomic/configure.ac | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/libatomic/configure.ac b/libatomic/configure.ac
> index 0dc4a98..4020d23 100644
> --- a/libatomic/configure.ac
> +++ b/libatomic/configure.ac
> @@ -226,9 +226,15 @@ LIBAT_ENABLE_SYMVERS
>  CFLAGS="$save_CFLAGS"
>  AC_CACHE_SAVE
>  
> -# Add -Wall -Werror if we are using GCC.
> +AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
> +                      [turns on -Werror @<:@default=yes@:>@])])
> +# Add -Wall if we are using GCC.
>  if test "x$GCC" = "xyes"; then
> -  XCFLAGS="$XCFLAGS -Wall -Werror"
> +  XCFLAGS="$XCFLAGS -Wall"
> +  # Add -Werror if requested.
> +  if test "x$enable_werror" != "xno"; then
> +    XCFLAGS="$XCFLAGS -Werror"
> +  fi
>  fi
>  
>  XCFLAGS="$XCFLAGS $XPCFLAGS"
Ryan Hill - July 19, 2013, 4:24 a.m.
On Mon, 8 Jul 2013 20:19:24 -0600
Ryan Hill <dirtyepic@gentoo.org> wrote:

Ping.

> On Mon,  1 Jul 2013 14:55:35 -0600
> Ryan Hill <dirtyepic@gentoo.org> wrote:
> 
> Ping.
> http://gcc.gnu.org/ml/gcc-patches/2013-07/msg00032.html
> 
> > libatomic is currently unconditionally built with -Werror.  This patch adds
> > --enable-werror to control it (enabled by default).  Bootstrapped and tested
> > on x86_64, and inspected build logs to ensure it was doing what it should.
> > 
> > I'm assuming copyright assignment isn't necessary for a small change like
> > this.  I will also need someone to check this in for me please.
> > 
> > gcc/libatomic/
> > 2013-06-30  Ryan Hill  <dirtyepic@gentoo.org>
> > 
> > 	* configure.ac: Add --enable-werror.
> > 	(XCFLAGS): Use it.
> > 	* configure: Regenerate.
> > 
> > ---
> >  libatomic/configure.ac | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libatomic/configure.ac b/libatomic/configure.ac
> > index 0dc4a98..4020d23 100644
> > --- a/libatomic/configure.ac
> > +++ b/libatomic/configure.ac
> > @@ -226,9 +226,15 @@ LIBAT_ENABLE_SYMVERS
> >  CFLAGS="$save_CFLAGS"
> >  AC_CACHE_SAVE
> >  
> > -# Add -Wall -Werror if we are using GCC.
> > +AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
> > +                      [turns on -Werror @<:@default=yes@:>@])])
> > +# Add -Wall if we are using GCC.
> >  if test "x$GCC" = "xyes"; then
> > -  XCFLAGS="$XCFLAGS -Wall -Werror"
> > +  XCFLAGS="$XCFLAGS -Wall"
> > +  # Add -Werror if requested.
> > +  if test "x$enable_werror" != "xno"; then
> > +    XCFLAGS="$XCFLAGS -Werror"
> > +  fi
> >  fi
> >  
> >  XCFLAGS="$XCFLAGS $XPCFLAGS"

Patch

diff --git a/libatomic/configure.ac b/libatomic/configure.ac
index 0dc4a98..4020d23 100644
--- a/libatomic/configure.ac
+++ b/libatomic/configure.ac
@@ -226,9 +226,15 @@  LIBAT_ENABLE_SYMVERS
 CFLAGS="$save_CFLAGS"
 AC_CACHE_SAVE
 
-# Add -Wall -Werror if we are using GCC.
+AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
+                      [turns on -Werror @<:@default=yes@:>@])])
+# Add -Wall if we are using GCC.
 if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
+  XCFLAGS="$XCFLAGS -Wall"
+  # Add -Werror if requested.
+  if test "x$enable_werror" != "xno"; then
+    XCFLAGS="$XCFLAGS -Werror"
+  fi
 fi
 
 XCFLAGS="$XCFLAGS $XPCFLAGS"