lua-users home
lua-l archive

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

On Dec 17, 2014, at 5:28 AM, Daniel Silverstone <> 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[1]. Saying things like "use -fpic unless you overflow the GOT; then use -fPIC" leads to head-shaking at the build engineer[2] 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.)


[2]: Build engineer? We're talking about what, you me and Enrico?