A patch for PIC default

H.J. Lu hjl@lucon.org
Tue Nov 17 19:43:00 GMT 1998


> 
> hjl@lucon.org (H.J. Lu) writes:
> 
> > It seems to work for me. I removed the change to sysdeps/i386/bits/string.h.
> > It is correct since it is the installed header file and __PIC__ is defined
> > when -fPIC is used. I will send a patch for linuxthreads later.
> 
> Thanks for your efforts.  I have a few problems, though.
> 
> I understand the reason why these changes are necessary.  The questions are:
> 
> - why introducing yet another symbol SHARED?
> 

The problem is you don't have to do PIC on a processor in the static
binary. PIC is more a calling convention. It is possible for different
OSes for the same CPU not to use PIC in the static binary. Depending
on the calling convention, you have to add -DPIC when compiling the
static binary for one OS and not to add it for the other. I believe
MIPS is such an example.


H.J.



More information about the Libc-hacker mailing list