This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for PIC default


> 
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]