From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2651 invoked by alias); 6 Jun 2010 21:42:28 -0000 Received: (qmail 2637 invoked by uid 22791); 6 Jun 2010 21:42:27 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,TW_CX,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Jun 2010 21:42:23 +0000 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id o56LgJdZ004749; Sun, 6 Jun 2010 14:42:20 -0700 Received: from pvg11 (pvg11.prod.google.com [10.241.210.139]) by wpaz37.hot.corp.google.com with ESMTP id o56LgIEZ001538; Sun, 6 Jun 2010 14:42:18 -0700 Received: by pvg11 with SMTP id 11so976263pvg.8 for ; Sun, 06 Jun 2010 14:42:18 -0700 (PDT) Received: by 10.142.202.20 with SMTP id z20mr10321303wff.241.1275860538048; Sun, 06 Jun 2010 14:42:18 -0700 (PDT) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id 33sm32404082wad.8.2010.06.06.14.42.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 06 Jun 2010 14:42:16 -0700 (PDT) To: Ralf Wildenhues Cc: Paolo Bonzini , binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH] Fix PR bootstrap/42798 References: <20100601204405.GA1170@gmx.de> <20100602111845.GA16161@ins.uni-bonn.de> <4C064B77.3020207@gnu.org> <20100603063319.GC28276@gmx.de> <20100603065852.GA28617@gmx.de> <20100606112828.GC29478@gmx.de> From: Ian Lance Taylor Date: Sun, 06 Jun 2010 21:42:00 -0000 In-Reply-To: <20100606112828.GC29478@gmx.de> (Ralf Wildenhues's message of "Sun\, 6 Jun 2010 13\:28\:33 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2010-06/txt/msg00162.txt.bz2 Ralf Wildenhues writes: > * Ian Lance Taylor wrote on Fri, Jun 04, 2010 at 04:59:01PM CEST: >> Ralf Wildenhues writes: >> >> > This is the followup patch for src. Tested by building binutils+gdb, >> > I'm starting a combined tree with --enable-build-with-cxx now. >> > Ok to commit if no problems show up? >> > >> > A note to the gold change: I've looked at git glibc headers, of the >> > declarations tested only 'basename' was overloaded. If more are added >> > in the future, the configure.ac files need to be adjusted to give >> > parameters for them, too. This applies to the whole tree of course for >> > --enable-build-with-cxx, not just for gold. >> >> With regard to the gold change. What will happen if the system header >> files provide only a declaration >> char *basename(const char *) >> ? >> >> Since gold doesn't actually basename, another option here would be to >> skip the check of the basename declaration entirely. In fact, we >> should consider dropping basename from libiberty; our code should in >> general use lbasename anyhow. > > Well, these are two additional changes on top of the one I posted though > and can easily be addressed in the future. Meanwhile, a combined build > with maintainer-mode enabled will cause spurious changes to generated > files, and the patch is pretty minimal in that it fixes the issues but > doesn't change semantics otherwise. So, ok to commit to src? My question about a basename declaration in the system header was a genuine question. My concern is that on some systems this patch might decide incorrectly whether or not basename is defined, which could then possibly lead to a compilation error when libiberty.h is included. The gold patch is fine if you omit basename entirely from the gold configure.ac. I don't see how that could cause trouble given the current libiberty.h. Ian