From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18028 invoked by alias); 24 Mar 2012 20:55:04 -0000 Received: (qmail 18019 invoked by uid 22791); 24 Mar 2012 20:55:04 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from dair.pair.com (HELO dair.pair.com) (209.68.1.49) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sat, 24 Mar 2012 20:54:50 +0000 Received: (qmail 80250 invoked by uid 20157); 24 Mar 2012 20:54:50 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 24 Mar 2012 20:54:50 -0000 Date: Sat, 24 Mar 2012 20:55:00 -0000 From: Hans-Peter Nilsson To: Mike Frysinger cc: gdb-patches@sourceware.org Subject: Re: Finalizing fix committed for "[PATCH] sim: make sure to include strsignal prototype" In-Reply-To: <201203241424.16156.vapier@gentoo.org> Message-ID: References: <1332476592-12930-1-git-send-email-vapier@gentoo.org> <201203241424.16156.vapier@gentoo.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00839.txt.bz2 On Sat, 24 Mar 2012, Mike Frysinger wrote: > On Saturday 24 March 2012 06:55:28 Hans-Peter Nilsson wrote: > > This patch was missing the critical include of cconfig.h so you > > should still have seen warnings about implicit declarations of > > strsignal when testing. > > as i mentioned earlier, there are no warnings for me because my glibc conforms > to the 2008 POSIX spec I saw that, but that didn't apply: the include of string.h in nrun.c after your patch was guarded by a macro that wasn't defined, with no other include of string.h *when compiling nrun.c for the CRIS sim* to which you were alerted. Right, you found there was another via sim-main.h or something for the MIPS compilation, so just recompiling that wouldn't test anything. Without describing how the patch was tested I assumed you did so for cris-elf. When compiling with a new enough glibc for string.h-without-_GNU_SOURCE, but gcc that I think is older than what you used (4.3.0, JFTR re the warnings) I got in my build-log: /home/hp/sim/src/sim/cris/../common/nrun.c: In function 'main': /home/hp/sim/src/sim/cris/../common/nrun.c:216: warning: implicit declaration of function 'strsignal' /home/hp/sim/src/sim/cris/../common/nrun.c:216: warning: format '%s' expects type 'char *', but argument 4 has type 'int' > > assembly-code tests and also apparently a compiler is not > > optional as for cris-sim, but required, causing spurious errors. > > if i knew how to make it optional, i would have them auto-skipped ;) See top of sim/testsuite/sim/cris/c/c.exp. Care taken to still iterate over the C test-cases so the "untested" count gets right. > > FWIW, all sim tests fail linking for cr16-elf+cr16-sim, maybe my > > locally added baseboard is out of date. > > http://sourceware.org/bugzilla/show_bug.cgi?id=12385 That's what I saw, good. > > --- nrun.c 24 Mar 2012 05:38:35 -0000 1.17 > > +++ nrun.c 24 Mar 2012 09:31:09 -0000 1.18 > > > > +/* Need to be before general includes, to pick up e.g. _GNU_SOURCE. */ > > +#ifdef HAVE_CONFIG_H > > +#include "cconfig.h" > > +#include "tconfig.h" > > +#endif > > the cconfig.h makes sense, but i don't think the tconfig.h does This is just a copy of the construct from run.c after checking that there indeed was a tconfig.h generated; a symlink. Never looked into the why of it, feel free investigate whether it's old cruft used nowhere. brgds, H-P PS. thanks for the ld report!