[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Use -fPIC when compiling lua
- From: Jay Carlson <nop@...>
- Date: Thu, 18 Dec 2014 21:32:18 -0500
On Dec 17, 2014, at 5:28 AM, Daniel Silverstone <firstname.lastname@example.org> wrote:
> On Wed, Dec 17, 2014 at 01:06:47 -0500, Jay Carlson wrote:
>> Eye roll. -fPIC is always safe on SVR4 descendents.
> It's also almost always slower than non PIC code on all but x86_32. Unless
> you're building a shared library or a position independent executable, don't
> use -fPIC.
In God we trust. All else bring math.
> Also, for reference, -fpic and -fPIC have different meanings on at least three
> architectures so be careful with which you mean and when.
Yes, I am aware. Saying things like "use -fpic unless you overflow the GOT; then use -fPIC" leads to head-shaking at the build engineer and then terrible ideas like "shared libraries are hard, link statically."
Especially with modern Lua minimizing external symbols, I don't see a problem with taking Sun's position: "life is short, use -fPIC" and SPARC is probably hit the worst in object code by big-GOT. (Embedded MIPS is hit the worst by everything else.)
: Build engineer? We're talking about what, you me and Enrico?