This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: A patch for PIC default
- To: drepper@cygnus.com
- Subject: Re: A patch for PIC default
- From: hjl@lucon.org (H.J. Lu)
- Date: Tue, 17 Nov 1998 19:43:35 -0800 (PST)
- Cc: libc-hacker@cygnus.com
>
> 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.