public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 2/2] [pr32193] libgomp: add a --enable-werror configure flag
Date: Sun, 23 Dec 2012 23:30:00 -0000	[thread overview]
Message-ID: <1356305421-13533-2-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1356305421-13533-1-git-send-email-vapier@gentoo.org>

URL: http://gcc.gnu.org/PR32193
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2012-12-23  Mike Frysinger  <vapier@gentoo.org>

	PR libgomp/32193
	* configure.ac: Call AC_ARG_ENABLE(werror).
	(XCFLAGS): Add -Werror when enable_werror is not no.
	* configure: Regenerated.
---
 libgomp/configure    | 16 +++++++++++++---
 libgomp/configure.ac |  7 ++++++-
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/libgomp/configure b/libgomp/configure
index 238b1af..3add57f 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -760,6 +760,7 @@ enable_version_specific_runtime_libs
 enable_generated_files_in_srcdir
 enable_multilib
 enable_dependency_tracking
+enable_werror
 enable_shared
 enable_static
 with_pic
@@ -1410,6 +1411,7 @@ Optional Features:
   --enable-multilib       build many library versions (default)
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-werror         turns on -Werror [default=yes]
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
@@ -4280,9 +4282,17 @@ fi
 # in both places for now and restore CFLAGS at the end of config.
 save_CFLAGS="$CFLAGS"
 
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;
+fi
+
 # Add -Wall -Werror if we are using GCC.
 if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
+  XCFLAGS="$XCFLAGS -Wall"
+  if test "x$enable_werror" != "xno"; then
+    XCFLAGS="$XCFLAGS -Werror"
+  fi
 fi
 
 # Find other programs we need.
@@ -11088,7 +11098,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11091 "configure"
+#line 11101 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11194,7 +11204,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11197 "configure"
+#line 11207 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libgomp/configure.ac b/libgomp/configure.ac
index d87ed29..3b9cd4b 100644
--- a/libgomp/configure.ac
+++ b/libgomp/configure.ac
@@ -113,9 +113,14 @@ AC_SUBST(CFLAGS)
 # in both places for now and restore CFLAGS at the end of config.
 save_CFLAGS="$CFLAGS"
 
+AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
+                                      [turns on -Werror @<:@default=yes@:>@])])
 # Add -Wall -Werror if we are using GCC.
 if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
+  XCFLAGS="$XCFLAGS -Wall"
+  if test "x$enable_werror" != "xno"; then
+    XCFLAGS="$XCFLAGS -Werror"
+  fi
 fi
 
 # Find other programs we need.
-- 
1.8.0

  reply	other threads:[~2012-12-23 23:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-23 23:30 [PATCH 1/2] [pr53679] libgo: " Mike Frysinger
2012-12-23 23:30 ` Mike Frysinger [this message]
2013-01-15 14:56 ` Ian Lance Taylor
2013-01-15 17:42   ` Mike Frysinger
2013-01-26  0:14     ` Ian Lance Taylor
2013-01-26  3:21       ` Mike Frysinger
2013-01-27  2:40         ` Ian Lance Taylor
2013-03-05  0:10           ` Mike Frysinger
2013-03-05  5:31             ` Ian Lance Taylor
2013-03-06 15:49               ` Diego Novillo
2013-03-07  6:59                 ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1356305421-13533-2-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).