bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool issue with latest Sun cc compiler on Linux


From: Ralf Wildenhues
Subject: Re: libtool issue with latest Sun cc compiler on Linux
Date: Fri, 16 Feb 2007 20:32:09 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Terry,

Thanks for the report.

* Terry D. Dontje wrote on Fri, Feb 16, 2007 at 01:55:10PM CET:
> 
> address@hidden:~/tmp/compissue>  cc -mt -c foo.c  -KPIC -DPIC -o foo.o 
> address@hidden:~/tmp/compissue> ar cru libtest.a foo.o 
> address@hidden:~/tmp/compissue> cc -G -Wl,--whole-archive,libtest.a 
> -Wl,--no-whole-archive -lnsl -lutil -lm -lc -mt -Wl,-soname 
> -Wl,libtest.so.0 -o libtest.so.0.0 /dev/null
> /dev/null: file not recognized: File truncated

That's weird.  I've had a chance to test this out now, and surprisingly,
I cannot reproduce this error over here with either of these versions:

| cc: Sun C 5.9 Build18_0 2006/03/13

| cc: Sun C 5.9 Linux_i386 Build35_2 2006/12/04

This is both on x86, and adding the /dev/null works:

$ touch a.c; cc -c a.c; ar cru liba.a a.o
| "a.c", line 1: warning: empty translation unit
$ cc -G -Wl,--whole-archive,liba.a -Wl,--no-whole-archive -Wl,-soname 
-Wl,libtest.so.0 -o libtest.so.0.0 /dev/null -#
| ### Note: NLSPATH = 
/opt/sunstudiomars/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/sunstudiomars/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
| ###     command line files and options (expanded):
| ### -Wl,--whole-archive,liba.a -Wl,--no-whole-archive -Wl,-soname 
-Wl,libtest.so.0 -shared /dev/null -o libtest.so.0.0
| ### Note: LD_LIBRARY_PATH = /opt/intel_cc_80/lib:/opt/intel_fc_80/lib
| ### Note: LD_RUN_PATH = <null>
| /usr/bin/ld --whole-archive liba.a --no-whole-archive -soname libtest.so.0 -m 
elf_i386 -dynamic-linker /lib/ld-linux.so.2 /opt/sunstudiomars/prod/lib/crti.o 
/opt/sunstudiomars/prod/lib/values-xa.o -o libtest.so.0.0 -shared /dev/null -Y 
"/opt/sunstudiomars/prod/lib:/lib:/usr/lib" -Qy -lc 
/opt/sunstudiomars/prod/lib/libc_supp.a /opt/sunstudiomars/prod/lib/crtn.o
$ echo $?
0
$ /usr/bin/ld --version
| GNU ld version 2.17 Debian GNU/Linux

> Note the following is my Sun CC version info:
> cc: Sun C 5.9 Linux_i386 Build35_2 2006/12/04

Weird, that's the same version.  So how can I reproduce this failure, so
that we don't fall into this trap again?  Is the error even produced by
cc, or by chance by ld?

Thanks,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]