This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a check-in within the last few days broke head build oftarget=avr on OSX


   Date: Sat, 14 May 2005 12:05:48 +0300
   From: "Eli Zaretskii" <eliz@gnu.org>

   > Date: Sat, 14 May 2005 03:13:09 -0400
   > From: Paul Schlie <schlie@comcast.net>
   > 
   > 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  <kettenis@gnu.org>

	* 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]