From patchwork Wed Nov 24 17:58:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 72927 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 D304AB6F14 for ; Thu, 25 Nov 2010 04:58:50 +1100 (EST) Received: (qmail 22202 invoked by alias); 24 Nov 2010 17:58:26 -0000 Received: (qmail 22169 invoked by uid 22791); 24 Nov 2010 17:58:19 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 24 Nov 2010 17:58:12 +0000 Received: (qmail 27024 invoked from network); 24 Nov 2010 17:58:10 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Nov 2010 17:58:10 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PLJbc-0003ft-UP; Wed, 24 Nov 2010 17:58:08 +0000 Date: Wed, 24 Nov 2010 17:58:08 +0000 (UTC) From: "Joseph S. Myers" To: Art Haas cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: Boostrap failures on Solaris at gcc/toplev.c stage2 compilation In-Reply-To: <201011241630.oAOGUcmK010091@impdell3.impactweather.local> Message-ID: References: <201011241630.oAOGUcmK010091@impdell3.impactweather.local> MIME-Version: 1.0 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 On Wed, 24 Nov 2010, Art Haas wrote: > This morning's build attempts on both i386-pc-solaris2.10 and > sparc-sun-solaris2.10 failed with the following error: > > /export/home/arth/gnu/gcc-1124/./prev-gcc/xgcc -B/export/home/arth/gnu/gcc-1124/./prev-gcc/ -B/export/home/arth/local/i386-pc-solaris2.10/bin/ -B/export/home/arth/local/i386-pc-solaris2.10/bin/ -B/export/home/arth/local/i386-pc-solaris2.10/lib/ -isystem /export/home/arth/local/i386-pc-solaris2.10/include -isystem /export/home/arth/local/i386-pc-solaris2.10/sys-include -c -g -O2 -gtoggle -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I/home/ahaas/gnu/gcc.git/gcc -I/home/ahaas/gnu/gcc.git/gcc/. -I/home/ahaas/gnu/gcc.git/gcc/../include -I/home/ahaas/gnu/gcc.git/gcc/../libcpp/include -I/export/home/arth/local/include -I/export/home/arth/local/include -I/home/ahaas/gnu/gcc.git/gcc/../libdecnumber -I/home/ahaas/gnu/gcc.git/gcc/../libdecnumber/dpd -I../libdecnumber /! > home/ahaas/gnu/gcc.git/gcc/tree-call-cdce.c -o tree-call-cdce.o > /home/ahaas/gnu/gcc.git/gcc/toplev.c: In function 'crash_signal': > /home/ahaas/gnu/gcc.git/gcc/toplev.c:445:3: error: implicit declaration of function 'signal' [-Werror=implicit-function-declaration] > cc1: all warnings being treated as errors > > The likely cause is this patch applied yesterday: > > 2010-11-23 Joseph Myers > { ...snip ... } > * toplev.c: Don't include or . > (setup_core_dumping, strip_off_ending, decode_d_option): Move to > opts.c. I've committed this patch as obvious to fix this. (With glibc, includes , as POSIX permits but does not require, which explains why I didn't see this in my testing.) I do wonder if it really makes sense for includes to go in individual source files or whether it would be better to put more headers in system.h. There may be cases where including a system header means you need to link in extra libraries - in all programs, not just the compilers proper - if it has inline functions (gmp.h and mpfr.h might be like that). But otherwise I think more host-side code should avoid including more system headers itself. Particular headers in point: . There are also several cases of host-side code including headers already included in system.h. Index: toplev.c =================================================================== --- toplev.c (revision 167122) +++ toplev.c (working copy) @@ -28,6 +28,7 @@ #include "system.h" #include "coretypes.h" #include "tm.h" +#include #ifdef HAVE_SYS_TIMES_H # include Index: ChangeLog =================================================================== --- ChangeLog (revision 167122) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2010-11-24 Joseph Myers + + * toplev.c: Include . + 2010-11-24 Richard Guenther PR lto/43218