[PATCH] Build libxf86config with -fPIC.

Dan Nicholson dbn.lists at gmail.com
Mon Nov 15 16:11:11 PST 2010


On Mon, Nov 15, 2010 at 10:38 AM, Julien Cristau <jcristau at debian.org> wrote:
> On Mon, Nov 15, 2010 at 13:28:34 -0500, Gaetan Nadon wrote:
>
>> On Mon, 2010-11-15 at 15:35 +0100, Julien Cristau wrote:
>>
>> > If you want to install it as a shared library you also want to track
>> > its
>> > ABI and give it a SONAME, which is more work.  Shipping it as a PIC
>> > static lib which you don't have to be as careful with possible ABI
>> > breaks, but you can still embed it in something like a python module
>> > (which must be PIC).
>> >
>>
>> This is an important point. We are waisting time trying to guess what
>> this patch is for.
>>
> Oh, I know what it's for, it's needed for pyxf86config.  I just don't
> think anyone is prepared to commit to a stable ABI for libxf86config, so
> installing it as a shared library may not be the best plan.

IMO, just because you decided to make the library shared doesn't mean
you've suddenly agreed to any more ABI stability than before.

However, I think you can make a libtool library (bringing in PIC
magic) and have it be static only. In addition to the diff I sent
earlier, add:

libxf86config_la_LDFLAGS = -static

A little testing with a dummy project shows this works.

--
Dan


More information about the xorg-devel mailing list