From patchwork Sun Dec 23 23:30:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 207995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id A54B42C0089 for ; Mon, 24 Dec 2012 10:30:28 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1356910228; h=Comment: DomainKey-Signature:Received:Received:Received:Received:From:To: Subject:Date:Message-Id:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=M3tgyaizVZcceTQUPaJneQpk+lk=; b=qcAQi3LaarYQ0k3 WAa3yFsIYs+4FBA1oB2hVIZOlqjfy6S5klm+8dqg1jnaNZ/Zk3yH+n4xFevutYbx YqO6K5iUnmR97Pxi89Nz6pgz7JtJQJ4zJZV12EKY1re+QdSwykTMrpLU2pbcDkym vXxpQWGRemDRLJliukxY1OApvEMY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:From:To:Subject:Date:Message-Id:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=sWJeHBl4TSlQxoU9rwTPQ/3UpU2B8HiAvvUP5rmx9oNEv8QUEcdli9Bly+aLuX fcyzpGdYfG15sfZnxqgYTtwOC5kVpHgpHg19qx7xhxoIVVGznze3bcNekB7b0jpV fBeNPHWtwdEU4t6S7R4abAb+FPFdDugVqR+Mr7ArIr+0U=; Received: (qmail 18088 invoked by alias); 23 Dec 2012 23:30:00 -0000 Received: (qmail 18069 invoked by uid 22791); 23 Dec 2012 23:29:59 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, TW_BF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 23 Dec 2012 23:29:52 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id AC7BF33D860 for ; Sun, 23 Dec 2012 23:29:51 +0000 (UTC) From: Mike Frysinger To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] [pr53679] libgo: add a --enable-werror configure flag Date: Sun, 23 Dec 2012 18:30:20 -0500 Message-Id: <1356305421-13533-1-git-send-email-vapier@gentoo.org> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org URL: http://gcc.gnu.org/PR53679 Signed-off-by: Mike Frysinger --- libgo/configure | 15 ++++++++++++--- libgo/configure.ac | 7 +++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/libgo/configure b/libgo/configure index 04fa89d..49cc4a9 100755 --- a/libgo/configure +++ b/libgo/configure @@ -809,6 +809,7 @@ enable_static with_pic enable_fast_install enable_libtool_lock +enable_werror enable_version_specific_runtime_libs with_libffi with_system_libunwind @@ -1449,6 +1450,7 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-werror turns on -Werror [default=yes] --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory @@ -11102,7 +11104,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11105 "configure" +#line 11107 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11208,7 +11210,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11211 "configure" +#line 11213 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13386,7 +13388,14 @@ done WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual' -WERROR="-Werror" +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; +fi + +if test "x$enable_werror" != "xno"; then + WERROR="-Werror" +fi glibgo_toolexecdir=no diff --git a/libgo/configure.ac b/libgo/configure.ac index 8cde50b..63d8cbc 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -50,8 +50,11 @@ AC_PROG_AWK WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual' AC_SUBST(WARN_FLAGS) -dnl FIXME: This should be controlled by --enable-maintainer-mode. -WERROR="-Werror" +AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror], + [turns on -Werror @<:@default=yes@:>@])]) +if test "x$enable_werror" != "xno"; then + WERROR="-Werror" +fi AC_SUBST(WERROR) glibgo_toolexecdir=no