In building a couple of perl extensions for Debian the other day, I
noticed that the version on the axp produced a dependency on the
loader and libc.

When I moved the same source over to my i386, I was told that the
resulting shared object was statically linked.

After a bit of puttering around, I was able to get the following:

axp:

$ LD_RUN_PATH="" cc -v -o blib/arch/auto/MD5/MD5.so  -shared -L/usr/local/lib 
MD5.o md5c.o
Reading specs from /usr/lib/gcc-lib/alpha-linux/2.7.2.1/specs
gcc version 2.7.2.1
 ld -m elf64alpha -G 8 -O1 -shared -o blib/arch/auto/MD5/MD5.so /usr/lib/crti.o 
/usr/lib/gcc-lib/alpha-linux/2.7.2.1/crtbegin.o -L/usr/local/lib 
-L/usr/lib/gcc-lib/alpha-linux/2.7.2.1 MD5.o md5c.o -lgcc -lc -lgcc 
/usr/lib/gcc-lib/alpha-linux/2.7.2.1/crtend.o /usr/lib/crtn.o

i386:

$ LD_RUN_PATH="" cc -v -o blib/arch/auto/MD5/MD5.so  -shared -L/usr/local/lib 
MD5.o md5c.o
Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.3/specs
gcc version 2.7.2.3
 ld -m elf_i386 -shared -o blib/arch/auto/MD5/MD5.so /usr/lib/crti.o 
/usr/lib/gcc-lib/i486-linux/2.7.2.3/crtbeginS.o -L/usr/local/lib 
-L/usr/lib/gcc-lib/i486-linux/2.7.2.3 MD5.o md5c.o -lgcc -lgcc 
/usr/lib/gcc-lib/i486-linux/2.7.2.3/crtendS.o /usr/lib/crtn.o 

The difference seems to be that the gcc on the alpha is linking in
-lgcc -lc -lgcc, where gcc on the i386 is just doing -lgcc twice.

So which is right, and if it's the i386, since moving to gcc-2.7.2.3
isn't an option for the alphw, does anyone know enough about specs
files to be able to suggest what should be done about the alpha setup?

Mike.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to