[Mesa-dev] libxatracker: automake and spurious symbols

Emil Velikov emil.l.velikov at gmail.com
Fri Apr 4 19:10:29 PDT 2014


On 01/04/14 01:32, Emil Velikov wrote:
> On 29/03/14 14:24, Kai Wasserbäch wrote:
>> Hi Emil,
>> Emil Velikov schrieb am 29.03.2014 14:21:
>>> On 29/03/14 12:37, Kai Wasserbäch wrote:
>>>> I saw one of your patches currently in review touching the Makefile.am of
>>>> libxatracker. Can you squeeze in another patch, that ensures, that the library
>>>> only exports its own symbols and not the entirety of LLVM as well? Because
>>>> somewhere between 4c79f088c0 and 9b6b084eb7, that started to happen. My
>>>> 4c79f088c0 build only exported symbols for xa_* functions, the current build of
>>>> 9b6b084eb7 adds some ten thousand LLVM symbols.
>>>>
>>> Yes that is the privilege of using LLVM, you export the whole LLVM world as
>>> soon as you go anywhere near it :P
>>>
>>> My initial plan was to do another round of "cleanup the exported symbols"
>>> but got sidetracked by stripping out duplication and making sure that the
>>> libraries just work (tm).
>>>
>>>> I tried a version script and and -export-symbols-regex '^xa_.*$$', which really
>>>> got added to the linking command, according to the build log, but didn't have
>>>> any impact on the actually exported symbols. I'm probably missing something as
>>>> I'm not too well versed in how to do things with Automake.
>>>>
>>> Strange... things were working fine last time I've checked. While I try to
>>> reproduce what build options are you using, LLVM version ? Can I take a look
>>> at the patch that you've used ?
>>
>> Sure. I've tried several variants of the attached
>> "0001-Build-libxatracker-Only-export-our-own-symbols.patch", where I replaced
>> "LDFLAGS" with "AM_LDFLAGS" and "libxatracker_la_LDFLAGS". The last didn't work
>> at all and Automake warned, that no library is using the name libxatracker_la,
>> even though just a few lines up there was "libxatracker_la_SOURCES". I also
>> tried listing all symbols explicitly in the version script, but that didn't
>> change anything either.
>>
>> The second approach was really just patching the Makefile to add the
>> -export-symbols-regex '^xa_.*$'
>> to the LDFLAGS. I did it the same way, it's used with the OMX stuff, see the
>> attached patch "0001-Build-libxatracker-pass-export-symbols-regex-to-link.patch"
>>
> The key issue with your approach is that you're restricting the exported
> symbols at the wrong "level". One should work on the finished target, as this
> is where all the linking (inc. the one against LLVM) happens. I will prep a
> series that clears the exported symbols in a more consistent way all across
> all gallium targets.
> 

https://github.com/evelikov/Mesa/ branch exported-symbol-cleanup

Feel free to checkout and give it a test.

-Emil



More information about the mesa-dev mailing list