Re: Build broken on amd64 - __explicit_bzero

2013-06-25 Thread Joerg Sonnenberger
On Mon, Jun 24, 2013 at 08:10:10PM -0700, Paul Goyette wrote:
 On Mon, 24 Jun 2013, Joerg Sonnenberger wrote:
 
 On Mon, Jun 24, 2013 at 11:21:46AM -0700, Paul Goyette wrote:
 With sources updated today at 12:50 UTC
 
 Try the attached patch. Otherwise, this is PR 47922.
 
 With the patch to ld/emultempl/elf32.em I get a new error, which
 looks like the patch itself might be useful (looks like a new
 library needed here?)

Updated patch is in the referenced PR.

Joerg


Re: Build broken on amd64 - __explicit_bzero

2013-06-25 Thread Riccardo Mottola

Hi,

On 06/24/13 22:13, Joerg Sonnenberger wrote:

On Mon, Jun 24, 2013 at 11:21:46AM -0700, Paul Goyette wrote:

With sources updated today at 12:50 UTC

Try the attached patch. Otherwise, this is PR 47922.

Joerg
It is broken for x86-32 too, here. I'll wait for the patch to be 
commited and will retest.


Riccardo


Re: Build broken on amd64 - __explicit_bzero

2013-06-24 Thread Joerg Sonnenberger
On Mon, Jun 24, 2013 at 11:21:46AM -0700, Paul Goyette wrote:
 With sources updated today at 12:50 UTC

Try the attached patch. Otherwise, this is PR 47922.

Joerg
Index: elf32.em
===
RCS file: /home/joerg/repo/netbsd/src/external/gpl3/binutils/dist/ld/emultempl/elf32.em,v
retrieving revision 1.5
diff -u -p -r1.5 elf32.em
--- elf32.em	7 Aug 2012 01:09:13 -	1.5
+++ elf32.em	24 Jun 2013 20:03:09 -
@@ -310,11 +310,17 @@ gld${EMULATION_NAME}_try_needed (struct 
  int force)
 {
   bfd *abfd;
-  const char *name = needed-name;
+  char *name;
   const char *soname;
   int link_class;
 
+  if (ld_sysroot)
+name = concat(ld_sysroot, /, needed-name, (const char *)NULL);
+  else
+name = needed-name;
   abfd = bfd_openr (name, bfd_get_target (link_info.output_bfd));
+  if (ld_sysroot)
+free(name);
   if (abfd == NULL)
 return FALSE;