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:

> The problem is you don't have to do PIC on a processor in the static
> binary.

I know.

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

This will only have an effect for assembler files.  There are not many
of them.  For those which are there one could create separate version,
maybe in a subdir named after this calling convention:

	sysdeps/mips/no-pic-in-static

I really want to avoid having even more macros controlling things like
this.  It's not necessary and only can add to confusion.

Plus: there is AFAIK so far no platform which requires the other
behaviour.  Maybe there never will and then we add this extra ugliness
without reason.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


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