public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* ld testsuite failures on cygwin: cannot find -lstandard
@ 2006-06-26 11:36 Christian Joensson
  2006-06-26 12:14 ` Pedro Alves
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Joensson @ 2006-06-26 11:36 UTC (permalink / raw)
  To: binutils

This is on current binutils trunk:

Running /usr/local/src/trunk/src/ld/testsuite/ld-auto-import/auto-import.exp ...
gcc  -B/usr/local/src/trunk/objdir-binutils/ld/tmpdir/gas/
-I/usr/local/src/trunk/src/ld/testsuite/ld-auto-import -g -O2
-L/usr/local/src/trunk/objdir-binutils/./ld -g -O2  -c
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/dll.c -o
tmpdir/dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -shared
--out-implib=tmpdir/libstandard.dll.a  -o tmpdir/dll.dll tmpdir/dll.o
-L/usr/lib -lcygwin -L/usr/lib/w32api -lkernel32
gcc  -B/usr/local/src/trunk/objdir-binutils/ld/tmpdir/gas/
-I/usr/local/src/trunk/src/ld/testsuite/ld-auto-import -g -O2
-L/usr/local/src/trunk/objdir-binutils/./ld -g -O2  -c
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c -o
tmpdir/client.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new  -o tmpdir/client.exe
--enable-auto-import /lib/crt0.o tmpdir/client.o -Ltmpdir -lstandard
-L/usr/lib -lcygwin -L/usr/lib/w32api -lkernel32
/usr/local/src/trunk/objdir-binutils/ld/ld-new: cannot find -lstandard
FAIL: linking auto-import client using a standard import library
/usr/local/src/trunk/objdir-binutils/ld/ld-new  -o tmpdir/client.exe
--enable-auto-import /lib/crt0.o tmpdir/client.o -Ltmpdir -ldll
-L/usr/lib -lcygwin -L/usr/lib/w32api -lkernel32
PASS: linking auto-import client using the dll
/usr/local/src/trunk/objdir-binutils/ld/ld-new  -o
tmpdir/clientimport.exe --enable-auto-import /lib/crt0.o
tmpdir/client.o -Ltmpdir -lsymlinked_dll -L/usr/lib -lcygwin
-L/usr/lib/w32api -lkernel32
/usr/local/src/trunk/objdir-binutils/ld/ld-new: cannot find -lsymlinked_dll
FAIL: linking auto-import client using symbolic linked dll
/usr/local/src/trunk/objdir-binutils/ld/ld-new  -o
tmpdir/clientimport.exe --disable-auto-import /lib/crt0.o
tmpdir/client.o -Ltmpdir -ldll -L/usr/lib -lcygwin -L/usr/lib/w32api
-lkernel32
tmpdir/client.o: In function `main':
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:24:
undefined reference to `var'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:27:
undefined reference to `var'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:30:
undefined reference to `var'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:32:
undefined reference to `var'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:34:
undefined reference to `var'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:37:
undefined reference to `foo'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:39:
undefined reference to `foo'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:41:
undefined reference to `foo'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:45:
undefined reference to `func_ptr'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:52:
undefined reference to `var2'
/usr/local/src/trunk/src/ld/testsuite/ld-auto-import/client.c:21:
undefined reference to `var'
PASS: linking with disabled auto-import
testcase /usr/local/src/trunk/src/ld/testsuite/ld-auto-import/auto-import.exp
completed in 2 seconds
Running /usr/local/src/trunk/src/ld/testsuite/ld-bootstrap/bootstrap.exp ...
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r  ldgram.o ldlex.o lexsup.o ldlang.o mri.o
ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o
ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o  tmpdir/ld-partial.o ../bfd/.libs/libbfd.a
../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
/usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
reference to `libiconv'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
reference to `libiconv_open'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
reference to `libiconv_close'
/usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
undefined reference to `libiconv_set_relocation_prefix'
FAIL: bootstrap
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r  ldgram.o ldlex.o lexsup.o ldlang.o mri.o
ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o
ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o  tmpdir/ld-partial.o ../bfd/.libs/libbfd.a
../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
/usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
reference to `libiconv'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
reference to `libiconv_open'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
reference to `libiconv_close'
/usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
undefined reference to `libiconv_set_relocation_prefix'
FAIL: bootstrap with strip
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r  ldgram.o ldlex.o lexsup.o ldlang.o mri.o
ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o
ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o --static tmpdir/ld-partial.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
/usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
reference to `libiconv'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
reference to `libiconv_open'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
reference to `libiconv_close'
/usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
undefined reference to `libiconv_set_relocation_prefix'
FAIL: bootstrap with --static
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r --traditional-format ldgram.o ldlex.o lexsup.o
ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o
ldmisc.o ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o --traditional-format tmpdir/ld-partial.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
/usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
reference to `libiconv'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
reference to `libiconv_open'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
reference to `libiconv_close'
/usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
undefined reference to `libiconv_set_relocation_prefix'
FAIL: bootstrap with --traditional-format
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r --no-keep-memory ldgram.o ldlex.o lexsup.o
ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o
ldmisc.o ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o --no-keep-memory tmpdir/ld-partial.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
child killed: hangup
FAIL: bootstrap with --no-keep-memory
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r  ldgram.o ldlex.o lexsup.o ldlang.o mri.o
ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o
ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o --relax tmpdir/ld-partial.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
/usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
reference to `libiconv'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
reference to `libiconv_open'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
reference to `libiconv_close'
/usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
undefined reference to `libiconv_set_relocation_prefix'
FAIL: bootstrap with --relax
testcase /usr/local/src/trunk/src/ld/testsuite/ld-bootstrap/bootstrap.exp
completed in 5 seconds

Any ideas?

-- 
Cheers,

/ChJ

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ld testsuite failures on cygwin: cannot find -lstandard
  2006-06-26 11:36 ld testsuite failures on cygwin: cannot find -lstandard Christian Joensson
@ 2006-06-26 12:14 ` Pedro Alves
  2006-06-26 12:19   ` Christian Joensson
  0 siblings, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2006-06-26 12:14 UTC (permalink / raw)
  To: Christian Joensson; +Cc: binutils

Christian Joensson wrote:

> This is on current binutils trunk:
>
> Running 
> /usr/local/src/trunk/src/ld/testsuite/ld-auto-import/auto-import.exp ...
> gcc  -B/usr/local/src/trunk/objdir-binutils/ld/tmpdir/gas/
> -I/usr/local/src/trunk/src/ld/testsuite/ld-auto-import -g -O2
> -L/usr/local/src/trunk/objdir-binutils/./ld -g -O2  -c
> /usr/local/src/trunk/src/ld/testsuite/ld-auto-import/dll.c -o
> tmpdir/dll.o
> /usr/local/src/trunk/objdir-binutils/ld/ld-new -shared

(snip)

> reference to `libiconv_open'
> /usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
> reference to `libiconv_close'
> /usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
> undefined reference to `libiconv_set_relocation_prefix'
> FAIL: bootstrap with --relax
> testcase /usr/local/src/trunk/src/ld/testsuite/ld-bootstrap/bootstrap.exp
> completed in 5 seconds
>
> Any ideas?
>
I've seen similar problems on arm-wince-pe.
Could you try this patch?
http://sourceware.org/ml/binutils/2006-06/msg00373.html

Cheers,
Pedro Alves

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ld testsuite failures on cygwin: cannot find -lstandard
  2006-06-26 12:14 ` Pedro Alves
@ 2006-06-26 12:19   ` Christian Joensson
  2006-06-27 10:05     ` Christian Joensson
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Joensson @ 2006-06-26 12:19 UTC (permalink / raw)
  To: Pedro Alves; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 5141 bytes --]

On 6/26/06, Pedro Alves <pedro.alves@domatica.pt> wrote:
> Christian Joensson wrote:
>
> > This is on current binutils trunk:
> >
> > Running
> > /usr/local/src/trunk/src/ld/testsuite/ld-auto-import/auto-import.exp ...
> > gcc  -B/usr/local/src/trunk/objdir-binutils/ld/tmpdir/gas/
> > -I/usr/local/src/trunk/src/ld/testsuite/ld-auto-import -g -O2
> > -L/usr/local/src/trunk/objdir-binutils/./ld -g -O2  -c
> > /usr/local/src/trunk/src/ld/testsuite/ld-auto-import/dll.c -o
> > tmpdir/dll.o
> > /usr/local/src/trunk/objdir-binutils/ld/ld-new -shared
>
> (snip)
>
> > reference to `libiconv_open'
> > /usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
> > reference to `libiconv_close'
> > /usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
> > undefined reference to `libiconv_set_relocation_prefix'
> > FAIL: bootstrap with --relax
> > testcase /usr/local/src/trunk/src/ld/testsuite/ld-bootstrap/bootstrap.exp
> > completed in 5 seconds
> >
> > Any ideas?
> >
> I've seen similar problems on arm-wince-pe.
> Could you try this patch?
> http://sourceware.org/ml/binutils/2006-06/msg00373.html

I think I got it right, I had to manually edit the pe.em file,
attached is a unified diff of what I have. I get normal bahaviour
now.... meaning

Windows XP Pro/SP2 cygwin Pentium M processor 2.13GHz system with packages:

binutils             20050610-1     2.16.91 20050610
bison                2.1-1          2.1
cygwin               1.5.19-4
dejagnu              20021217-2     1.4.2.x
expect               20030128-1     5.26
gcc                  3.4.4-1
gmp                  4.1.4-2
make                 3.80-1	
tcltk                20030901-1     8.4
w32api               3.7-1	

LAST_UPDATED: Sat Jun 24 10:59:25 GMT 2006

Native configuration is i686-pc-cygwin

		=== binutils tests ===


Running target unix

		=== binutils Summary ===

# of expected passes		75
# of expected failures		1
# of unsupported tests		1
		=== gas tests ===


Running target unix

		=== gas Summary ===

# of expected passes		117
# of expected failures		1
		=== ld tests ===


Running target unix
FAIL: bootstrap with --static
FAIL: cdtest with -Ur
XPASS: align1
FAIL: weak symbols

		=== ld Summary ===

# of expected passes		38
# of unexpected failures	3
# of unexpected successes	1
# of expected failures		3
# of unsupported tests		1


and the failures in ld look like this:

/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r  ldgram.o ldlex.o lexsup.o ldlang.o mri.o
ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o
ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o --static tmpdir/ld-partial.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
/usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
reference to `libiconv'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
reference to `libiconv_open'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
reference to `libiconv_close'
/usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
undefined reference to `libiconv_set_relocation_prefix'
FAIL: bootstrap with --static

which to me indicates libiconv is somehow missing as linked in, I have
/usr/lib/libiconv.a as well as /usr/lib/libiconv.dll.a ...

and

/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/cdtest.o -r -Ur tmpdir/cdtest-foo.o tmpdir/cdtest-bar.o
tmpdir/cdtest-main.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/cdtest /lib/crt0.o tmpdir/cdtest.o  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
tmpdir/cdtest >tmpdir/cdtest.out
assertion "Foo::nb_foos() == 2" failed: file
"/usr/local/src/trunk/src/ld/testsuite/ld-cdtest/cdtest-main.cc", line
32
FAIL: cdtest with -Ur

which is an oldie, http://sourceware.org/bugzilla/show_bug.cgi?id=46

and

Running /usr/local/src/trunk/src/ld/testsuite/ld-scripts/weak.exp ...
/usr/local/src/trunk/objdir-binutils/ld/../gas/as-new   -o
tmpdir/weak1.o /usr/local/src/trunk/src/ld/testsuite/ld-scripts/weak1.s
/usr/local/src/trunk/objdir-binutils/ld/../gas/as-new   -o
tmpdir/weak2.o /usr/local/src/trunk/src/ld/testsuite/ld-scripts/weak2.s
/usr/local/src/trunk/objdir-binutils/ld/ld-new  -o tmpdir/weak
--image-base 0 -T
/usr/local/src/trunk/src/ld/testsuite/ld-scripts/weak.t tmpdir/weak1.o
tmpdir/weak2.o
/usr/local/src/trunk/objdir-binutils/ld/../binutils/objdump -s tmpdir/weak

tmpdir/weak:     file format pei-i386

Contents of section .text:
 1000 08100000 18200000 12121212 34343434  ..... ......4444
Contents of section .data:
 2000 10100000 0c200000 56565656 78787878  ..... ..VVVVxxxx
FAIL: weak symbols

which also is an oldie; http://sourceware.org/bugzilla/show_bug.cgi?id=977

-- 
Cheers,

/ChJ

[-- Attachment #2: pe.em.patch --]
[-- Type: application/octet-stream, Size: 2725 bytes --]

--- ld/emultempl/pe.em.orig	2006-06-24 12:59:22.000000000 +0200
+++ ld/emultempl/pe.em	2006-06-26 14:06:00.780501600 +0200
@@ -1697,52 +1697,61 @@
   static const struct
     {
       const char * format;
+      int fixed_len;
       bfd_boolean use_prefix;
     }
   libname_fmt [] =
     {
       /* Preferred explicit import library for dll's.  */
-      { "lib%s.dll.a", FALSE },
+      { "lib%s.dll.a", 9, FALSE },
       /* Alternate explicit import library for dll's.  */
-      { "%s.dll.a", FALSE },
+      { "%s.dll.a", 6, FALSE },
       /* "libfoo.a" could be either an import lib or a static lib.
           For backwards compatibility, libfoo.a needs to precede
           libfoo.dll and foo.dll in the search.  */
-      { "lib%s.a", FALSE },
+      { "lib%s.a", 5, FALSE },
       /* The 'native' spelling of an import lib name is "foo.lib".  */  	
-      { "%s.lib", FALSE },
+      { "%s.lib", 4, FALSE },
 #ifdef DLL_SUPPORT
       /* Try "<prefix>foo.dll" (preferred dll name, if specified).  */
-      {	"%s%s.dll", TRUE },
+      {	"%s%s.dll", 4, TRUE },
 #endif
       /* Try "libfoo.dll" (default preferred dll name).  */
-      {	"lib%s.dll", FALSE },
+      {	"lib%s.dll", 7, FALSE },
       /* Finally try 'native' dll name "foo.dll".  */
-      {  "%s.dll", FALSE },
-      /* Note: If adding more formats to this table, make sure to check to
-	 see if their length is longer than libname_fmt[0].format, and if
-	 so, update the call to xmalloc() below.  */
-      { NULL, FALSE }
+      { "%s.dll", 4, FALSE },
+      { NULL, 0, FALSE }
     };
   const char * filename;
   char * full_string;
   char * base_string;
   unsigned int i;
 
+  static int fixed_format_max_len = -1;
 
   if (! entry->is_archive)
     return FALSE;
 
+  if (fixed_format_max_len < 0)
+    {
+      fixed_format_max_len = 0;
+      for (i = 0; libname_fmt[i].format; i++)
+	{
+	  if (fixed_format_max_len < libname_fmt[i].fixed_len)
+	    fixed_format_max_len = libname_fmt[i].fixed_len;
+	}
+    }
+  
   filename = entry->filename;
 
   full_string = xmalloc (strlen (search->name)
 			 + strlen (filename)
-			 /* Allow space for the characters in the format
-			    string.  Also allow for the path separator that
-			    is appended after the search name. We actually
-			    allow 1 more byte than is strictly necessary,
-			    but this will not hurt.  */
-			 + sizeof libname_fmt[0].format
+			 /* Allow space for the fixed characters in the format
+			    string.  */
+			 + fixed_format_max_len
+			 /* Also allow for the path separator that
+			    is appended after the search name.  */
+			 + sizeof ("/") - 1
 #ifdef DLL_SUPPORT
 			 + (pe_dll_search_prefix
 			    ? strlen (pe_dll_search_prefix) : 0)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ld testsuite failures on cygwin: cannot find -lstandard
  2006-06-26 12:19   ` Christian Joensson
@ 2006-06-27 10:05     ` Christian Joensson
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Joensson @ 2006-06-27 10:05 UTC (permalink / raw)
  To: Pedro Alves; +Cc: binutils

On 6/26/06, Christian Joensson <christian.joensson@gmail.com> wrote:

> and the failures in ld look like this:
>
> /usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
> tmpdir/ld-partial.o -r  ldgram.o ldlex.o lexsup.o ldlang.o mri.o
> ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o
> ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
> /usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
> tmpdir/ld1 /lib/crt0.o --static tmpdir/ld-partial.o
> ../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  --start-group
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
> -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
> /usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
> reference to `libiconv'
> /usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
> reference to `libiconv_open'
> /usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
> reference to `libiconv_close'
> /usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
> undefined reference to `libiconv_set_relocation_prefix'
> FAIL: bootstrap with --static
>
> which to me indicates libiconv is somehow missing as linked in, I have
> /usr/lib/libiconv.a as well as /usr/lib/libiconv.dll.a ...

so... if I do this:

chj@toppen /usr/local/src/trunk/objdir-binutils/ld
$ /usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r  ldgram.o ldlex.o lexsup.o ldlang.o mri.o
ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o
ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o

chj@toppen /usr/local/src/trunk/objdir-binutils/ld
$ /usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o --static tmpdir/ld-partial.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
/usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
reference to `libiconv'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
reference to `libiconv_open'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
reference to `libiconv_close'
/usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
undefined reference to `libiconv_set_relocation_prefix'

chj@toppen /usr/local/src/trunk/objdir-binutils/ld
$ /usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o --static tmpdir/ld-partial.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  -liconv
--start-group /usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc
--end-group -lcygwin -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32
-lshell32 /usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a

which leads me to the conclusion that either is libiconv not properly
detected under cygwin either for this test or generally, or that
libiconv is not propelry added as linker option under cygwin for this
test...

-- 
Cheers,

/ChJ

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-06-27  9:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 11:36 ld testsuite failures on cygwin: cannot find -lstandard Christian Joensson
2006-06-26 12:14 ` Pedro Alves
2006-06-26 12:19   ` Christian Joensson
2006-06-27 10:05     ` Christian Joensson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).