Re: -fPIC and x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-08-23 at 14:04 -0600, Orion Poplawski wrote:
> Jakub Jelinek wrote:
> > But in that case not just for x86_64, but for all architectures.
> > If the library is small and is expected to be only linked into small shared
> > libraries, -fpic can be used instead.
> > What small means is architecture dependent, on i386/x86_64 -fpic/-fPIC are
> > identical, on other arches it can mean e.g. 4K got entries limit or similar.
> 
> But I don't know what shared libraries it will be link to, so shouldn't 
> I use -fPIC to be safe?  Or are there other drawbacks?

Hi Orion,

According to the GCC docs, -fpic and -fPIC are basically identical in
i386 systems since they have no inherent limits on the GOT size.  There
is, however, a limit on PowerPC systems!  So, in the interest of not
wasting time on these fiddly annoyances that will only potentially bite
Fedora ppc users, I'd skip -fpic and go straight to -fPIC.  Please!  ;-)

And I think it would be nice if adding -fPIC was strongly recommended
for all *.a libs since people almost inevitably want to use them (at
some later date) to build shared libs.

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3@xxxxxxx                ed@xxxxxxx
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464


[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux