freetype
[Top][All Lists]
Advanced

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

Re: [ft] Position independent code


From: Werner LEMBERG
Subject: Re: [ft] Position independent code
Date: Tue, 13 Mar 2018 00:32:40 +0100 (CET)

>>> Suppose I want to compile freetype as position independent code
>>> because I need to statically link it into a shared object.  What's
>>> the best way to do this?  Should I simply run 'configure' like
>>> this...
>>>
>>> ./configure CFLAGS='-g -O2 -fPIC'
>>>
>>> ...or is there a better way to do that?
>>
>> I think you don't need that.  IIRC, libtool (which is used behind
>> the scenes to generate the compiler calls in the makefile)
>> automatically calls `-fPIC'.
>
> Even when I say ./configure --enabled-shared=no?

???  You write that you want `to statically link it into a shared
object'.  So you actually have to create a shared object, no?

However, libtool allows you to say

  ./configure --disable-shared --with-pic

which should enable pic objects for static libraries (this is
untested, though).


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]