From patchwork Wed Oct 29 10:28:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 404506 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44BF214008B for ; Wed, 29 Oct 2014 21:29:14 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=FyAeyN98gF8OMs+Ni dRF90ev1t3mtJrkgstBT1MEIebJj7AjXhEfoBtCntFB/re8dZbAju2Pt8/McnsuV 3XPBfV8mOiJ70zEo8z79srcQHt6YFUdsTtqyZPmiSnH8NH4hHCEPTluFa7zk/cU5 RMeg5L6PjUvk8J/dteVblygPUc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=PAldl7plw+CUL9LNwN5qC9q Y9+s=; b=ggcQLqNqkOxG/rwmpd3BryoKk2LaQ8EZ9JHt2SpmTJTLoBIaLRR96Yv T2SGaGtxRiX5lSQpfi9cnXMpvcaxpE9mUySNqF6iw2fhEpmZnuViGGysFcOoziv9 wFqOcYVlexxHIyXM9zbXCvsVVyg1zGzeZs4gxWFomSOJbQEgf2zU= Received: (qmail 22158 invoked by alias); 29 Oct 2014 10:28:29 -0000 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 Received: (qmail 22135 invoked by uid 89); 29 Oct 2014 10:28:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 29 Oct 2014 10:28:26 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9TASNql004671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 Oct 2014 06:28:23 -0400 Received: from tucnak.zalov.cz (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9TASLLs012770 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Wed, 29 Oct 2014 06:28:23 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id s9TASJKO006431; Wed, 29 Oct 2014 11:28:20 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id s9TASHnR005132; Wed, 29 Oct 2014 11:28:17 +0100 Date: Wed, 29 Oct 2014 11:28:17 +0100 From: Jakub Jelinek To: Phil Muldoon , Paolo Bonzini , DJ Delorie , Alexandre Oliva , Ralf Wildenhues Cc: "Joseph S. Myers" , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 5/5] add libcc1 Message-ID: <20141029102817.GP10376@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <87oayx4l0x.fsf@fleche.redhat.com> <87bntobp1f.fsf@fleche.redhat.com> <53D9CA7B.3040709@redhat.com> <5436504B.8060902@redhat.com> <54385676.4000004@redhat.com> <5449FC98.1060404@redhat.com> <544A8162.1090107@redhat.com> <544E9CE5.602@redhat.com> <544FD432.8090004@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <544FD432.8090004@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes On Tue, Oct 28, 2014 at 05:36:50PM +0000, Phil Muldoon wrote: > On 28/10/14 13:19, Joseph S. Myers wrote: > > I'm seeing a different bootstrap failure from those already discussed: > > > > In file included from > > /scratch/jmyers/fsf/gcc-mainline/libcc1/../gcc/gcc-plugin.h:28:0, > > from > > /scratch/jmyers/fsf/gcc-mainline/libcc1/plugin.cc:34: > > /scratch/jmyers/fsf/gcc-mainline/libcc1/../gcc/system.h:653:17: fatal error: gmp.h: No such file or directory > > > > It appears the build is ignoring the --with-gmp option passed to > > configure. Since is included in system.h, if you include system.h > > you have to pass the right -I option corresponding to --with-gmp / > > --with-gmp-include. (There are several other such configure options for > > MPFR, MPC, CLooG, ISL, libiconv at least - whether they are relevant > > depends on whether your code ends up including the relevant headers.) > > Hi, sorry for the troubles! I am having difficulty seeing this fail on > my system. I built gmp from upstream, installed it, and pointed to > the install location with --with-gmp. Which stage does your build fail > at? > > I am actually not totally sure how to respect the -with-gmp argument > in libcc1. auto* tools are not my strongest skill. ;) > > I notice gcc/configure.ac I think just exports the variables to > Makefile.in from the main configure script. That what we should do in > this case? Here is a patch I'm bootstrapping/regtesting now (but, with system gmp installed). I've verified that with this patch stage1 libcc1 is built without -Werror in flags, while stage2 libcc1 is built with -Werror. If this passes bootstrap/regtest, is it ok for trunk (should fix two bootstrap issues)? Is the https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02936.html patch ok too (that one already tested; another bootstrap issue)? 2014-10-29 Jakub Jelinek Phil Muldoon * configure.ac: Remove -Werror addition to WARN_FLAGS. Add ACX_PROG_CC_WARNINGS_ARE_ERRORS and AC_ARG_VAR for GMPINC. * Makefile.am (AM_CPPFLAGS): Add $(GMPINC). (WERROR_FLAG): Remove. (AM_CXXFLAGS): Use $(WERROR) instead of $(WERROR_FLAG). * configure: Regenerated. * Makefile.in: Regenerated. Jakub --- libcc1/configure.ac.jj 2014-10-28 14:39:52.000000000 +0100 +++ libcc1/configure.ac 2014-10-29 10:01:36.515497687 +0100 @@ -52,8 +52,10 @@ gcc_version=`cat $srcdir/../gcc/BASE-VER AC_SUBST(gcc_version) ACX_PROG_CC_WARNING_OPTS([-W -Wall], [WARN_FLAGS]) -WARN_FLAGS="$WARN_FLAGS -Werror" AC_SUBST(WARN_FLAGS) +ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual]) + +AC_ARG_VAR(GMPINC,[How to find GMP include files]) libsuffix= if test "$GXX" = yes; then --- libcc1/Makefile.am.jj 2014-10-29 09:53:00.000000000 +0100 +++ libcc1/Makefile.am 2014-10-29 10:02:08.481885746 +0100 @@ -21,9 +21,8 @@ gcc_build_dir = ../$(host_subdir)/gcc AM_CPPFLAGS = -I $(srcdir)/../include -I $(srcdir)/../libgcc \ -I $(gcc_build_dir) -I$(srcdir)/../gcc \ -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ - -I $(srcdir)/../libcpp/include -WERROR_FLAG = -Werror -AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) + -I $(srcdir)/../libcpp/include $(GMPINC) +AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS)) override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS)) # Can be simplified when libiberty becomes a normal convenience library. --- libcc1/configure.jj 2014-10-28 14:39:52.000000000 +0100 +++ libcc1/configure 2014-10-29 10:02:32.957419099 +0100 @@ -605,6 +605,8 @@ LIBOBJS ENABLE_PLUGIN_FALSE ENABLE_PLUGIN_TRUE libsuffix +GMPINC +WERROR WARN_FLAGS gcc_version visibility @@ -743,6 +745,7 @@ with_pic enable_fast_install with_gnu_ld enable_libtool_lock +enable_werror_always enable_plugin ' ac_precious_vars='build_alias @@ -757,7 +760,8 @@ CPP CXX CXXFLAGS CCC -CXXCPP' +CXXCPP +GMPINC' # Initialize some variables set by options. @@ -1387,6 +1391,7 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-werror-always enable -Werror despite compiler version --enable-plugin enable plugin support Optional Packages: @@ -1409,6 +1414,7 @@ Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor + GMPINC How to find GMP include files Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -10530,7 +10536,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10533 "configure" +#line 10539 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10636,7 +10642,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10639 "configure" +#line 10645 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14342,7 +14348,21 @@ fi done CFLAGS="$save_CFLAGS" -WARN_FLAGS="$WARN_FLAGS -Werror" + +WERROR= +# Check whether --enable-werror-always was given. +if test "${enable_werror_always+set}" = set; then : + enableval=$enable_werror_always; +else + enable_werror_always=no +fi + +if test $enable_werror_always = yes; then : + WERROR="$WERROR${WERROR:+ }-Werror" +fi + + + libsuffix= --- libcc1/Makefile.in.jj 2014-10-29 09:53:00.000000000 +0100 +++ libcc1/Makefile.in 2014-10-29 10:02:35.739365984 +0100 @@ -140,6 +140,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GMPINC = @GMPINC@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -178,6 +179,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WARN_FLAGS = @WARN_FLAGS@ +WERROR = @WERROR@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -247,10 +249,9 @@ gcc_build_dir = ../$(host_subdir)/gcc AM_CPPFLAGS = -I $(srcdir)/../include -I $(srcdir)/../libgcc \ -I $(gcc_build_dir) -I$(srcdir)/../gcc \ -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ - -I $(srcdir)/../libcpp/include + -I $(srcdir)/../libcpp/include $(GMPINC) -WERROR_FLAG = -Werror -AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility) +AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) # Can be simplified when libiberty becomes a normal convenience library. libiberty_normal = ../libiberty/libiberty.a libiberty_noasan = ../libiberty/noasan/libiberty.a