[Mesa-dev] [PATCH 2/2] travis-ci: Add libunwind-dev to gallium/make builds
Emil Velikov
emil.l.velikov at gmail.com
Mon Sep 11 17:12:02 UTC 2017
On 11 September 2017 at 17:38, Gert Wollny <gw.fossdev at gmail.com> wrote:
> Am Montag, den 11.09.2017, 17:05 +0100 schrieb Emil Velikov:
>> On 10 September 2017 at 12:17, Gert Wollny <gw.fossdev at gmail.com>
>> wrote:
>> > configure picks up libunwind automatically if it is available and
>> > links libmesagallium against it. Because static linking is used
>> > all targets that use libmesagallium also need to link against
>> > libunwind
>> > in this case, and this should be checked on travis-ci.
>>
>> I'm slightly confused by the sentence, what do you mean with "Because
>> static linking is used"?
>
> If you have a dependency chain
>
> Exe -> libA -> libB
>
> in which Exe does not use symbols from libB, then libB can be omitted
> when dynamically linking against libA (Exe will not directly depend on
> libB, the same one achieves by specifying --as-needed as linker flag),
> and I assume that all targets that link against libmesagallium don't
> actually use symbols from libunwind directly.
>
> In static linking also the symbols that are used by libA need to be
> available, hence libB needs to be specified, hence the comment.
>
First thing that clicked - damn I need to do a PhD.
Your explanation is perfectly correct, although a lot more complex
than it could be ;-) That combined with a few typo/thinkos got me
confused.
How we use something simpler? One example is below - feel free to
reuse it or not.
"libunwind is an optional dependency used by the gallium aux. module
(libgallium).
And effectively in the final binaries.
Build with libunwind to catch any instances where it's missing in the
link path."
-Emil
More information about the mesa-dev
mailing list