Subject: Re: different behaviour of system cc and TOOLDIR/cc
To: Todd Vierling <tv@pobox.com>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-toolchain
Date: 06/11/2003 09:38:48
On Wednesday, June 11, 2003, at 09:20  AM, Todd Vierling wrote:

> : For comparision I looked at a Debian system - there is just one
> : libgcc.a which is always used (the spec rule is just "-lgcc"),
> : but libgcc.a contains PIC code. (checked with objdump -r)
> : Seems correct, albeit not optimized for performance of static
> : programs.
> Which is a possibility, but there have been problems linking PIC and 
> non-PIC
> on some architectures in the past.  I don't know if that is still the 
> case.

Hm.  All of the CRT files are built PIC, and I thought I had configured 
the NetBSD target to build libgcc PIC, as well... but it looks as if I 
have not.  I'll have to fix that.

You can test it by adding:

TARGET_LIBGCC2_CFLAGS += -fPIC

to gcc/config/t-netbsd

         -- Jason R. Thorpe <thorpej@wasabisystems.com>