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?

- some files do have a different form .o and .os even for platforms where
  PIC is the default.  These files are all those which include versioning
  code.


Therefore I think the correct change is this:

- remove defining PIC from the CFLAGS-.o  This cannot make any sense.

- somehow mark those object files which contain versioning stuff and
  therefore are only used in the shared object.


This way we can build a libc.a and libc_pic.a.  Both files mainly
contain the .o files but libc_pic.a has those .o files replaced by .os
files if they contain versioning information.

I think this is only an optimization and therefore will not be added
before 2.1.  Anybody volunteer to make such a patch for later?

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