From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6829 invoked by alias); 14 May 2005 11:17:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6691 invoked from network); 14 May 2005 11:17:28 -0000 Received: from unknown (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 14 May 2005 11:17:28 -0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j4EBHLCV017277; Sat, 14 May 2005 13:17:21 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j4EBHLUR013608; Sat, 14 May 2005 13:17:21 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j4EBHHks012087; Sat, 14 May 2005 13:17:17 +0200 (CEST) Date: Sat, 14 May 2005 11:34:00 -0000 Message-Id: <200505141117.j4EBHHks012087@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: binutils@sources.redhat.com, eliz@gnu.org CC: schlie@comcast.net, gdb-patches@sources.redhat.com In-reply-to: <01c55864$Blat.v2.4$43f48780@zahav.net.il> (eliz@gnu.org) Subject: Re: a check-in within the last few days broke head build of target=avr on OSX References: <01c55864$Blat.v2.4$43f48780@zahav.net.il> X-SW-Source: 2005-05/txt/msg00340.txt.bz2 Date: Sat, 14 May 2005 12:05:48 +0300 From: "Eli Zaretskii" > Date: Sat, 14 May 2005 03:13:09 -0400 > From: Paul Schlie > > ld: Undefined symbols: > _basename_cannot_be_used_without_a_prototype > make[1]: *** [gdb] Error 1 > make: *** [all-gdb] Error 2 > > (any ideas as to what within the last few days may have affected this?) The _basename_cannot_be_used_without_a_prototype thingy is defined on libiberty.h. Could you please look at the preprocessor conditionals there and see which one of them changed lately, and why? There's a new _basename_cannot_be_used_without_a_prototype in there instead of a function declaration without function arguments. We get hit by this because bfd/elflink.c uses basename(). Other parts of bfd/ use lbasename, so I propose the attached patch. ok? Index: ChangeLog from Mark Kettenis * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead of basename. Index: elflink.c =================================================================== RCS file: /cvs/src/src/bfd/elflink.c,v retrieving revision 1.163 diff -u -p -r1.163 elflink.c --- elflink.c 8 May 2005 13:43:48 -0000 1.163 +++ elflink.c 14 May 2005 11:12:12 -0000 @@ -5377,7 +5377,7 @@ bfd_elf_size_dynamic_sections (bfd *outp { bfd_size_type indx; - name = basename (output_bfd->filename); + name = lbasename (output_bfd->filename); def.vd_hash = bfd_elf_hash (name); indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, name, FALSE); @@ -5600,7 +5600,7 @@ bfd_elf_size_dynamic_sections (bfd *outp indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, elf_dt_name (t->vn_bfd) != NULL ? elf_dt_name (t->vn_bfd) - : basename (t->vn_bfd->filename), + : lbasename (t->vn_bfd->filename), FALSE); if (indx == (bfd_size_type) -1) return FALSE;