[x265] [PATCH] cmake: use cmake 2.8 OBJECT target type to manage static and share libs
Steve Borho
steve at borho.org
Tue Oct 8 10:00:06 CEST 2013
On Tue, Oct 8, 2013 at 2:54 AM, Steve Borho <steve at borho.org> wrote:
>
>
>
> On Tue, Oct 8, 2013 at 2:50 AM, Steve Borho <steve at borho.org> wrote:
>
>> # HG changeset patch
>> # User Steve Borho <steve at borho.org>
>> # Date 1381194546 18000
>> # Mon Oct 07 20:09:06 2013 -0500
>> # Node ID 6b457a8c52376af24ddcad014ad1793209574e74
>> # Parent 9b3a427a1009d1853bbdc30abe1fd891864e6b38
>> cmake: use cmake 2.8 OBJECT target type to manage static and share libs
>>
>
> This seems like the correct approach to deal with needing to create a
> static lib and shared lib from the same source base that spans several
> directories; and it works perfectly with MinGW/GCC and MSVC.
>
> However on Linux x64 I get this inexplicable error about -fPIC when
> clearly everything is getting built with -fPIC (gcc) or -DPIC (yasm):
>
Argh: beware CTRL+Enter with gmail. Anyway, here is the error message:
/usr/bin/ld: common/CMakeFiles/common.dir/x86/pixel-a.asm.o: relocation
R_X86_64_PC32 against symbol `x265_pw_00ff' can not be used when making a
shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libx265.so] Error 1
This is a symbol exported by const-a.asm and imported by pixel-a.asm and
others. I don't see how this could be messed up. Does this ring any bells
to anyone?
--
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131008/f3ca11e0/attachment.html>
More information about the x265-devel
mailing list