[arch-general] RFC: Mesa and shared LLVM libraries

Allan McRae allan at archlinux.org
Sun Mar 3 15:20:32 EST 2013


On 04/03/13 06:11, Armin K. wrote:
> On 03/03/2013 09:04 PM, Armin K. wrote:
>> Hello everyone,
>>
>> First, I am aware that ArchLinux is against patching packages to
>> implement some features, but this might be worth the effort.
>>
>> Tom Stellard of AMD has announced a R600 backend patch against LLVM 3.2
>> few days ago [1]. It's basically his repository (llvm-amdgpu-snapshot)
>> diffed against upstream LLVM (llvm).
>>
>> By applying the patch to ArchLinux LLVM package, one could benefit from
>> enabling Mesa to link against LLVM shared library. Doing so, space would
>> be saved and so the memory at runtime, too (I guess since it will use
>> shared mappings).
>>
>> I've done some work regarding that. I've managed to split libLLVM-3.2.so
>> from llvm package and put it into libllvm package.
>>
>> The package is a bit big though - the shared library contains all (~100)
>> static libraries linked into one single library.
>>
>> The result is like this:
>>
>> Targets (1): libllvm-3.2-5
>>
>> Total Installed Size:   21.77 MiB
>>
>> Building MesaLib against shared libLLVM-3.2.so saves space drastically.
>> For all MesaLib produced packages, the output is like this one:
>>
>> Targets (6): ati-dri-9.1-2  intel-dri-9.1-2  mesa-9.1-2
>> mesa-libgl-9.1-2  nouveau-dri-9.1-2  svga-dri-9.1-2
>>
>> Total Installed Size:   82.13 MiB
>> Net Upgrade Size:       -282.07 MiB
>>
>> 260 MB saved ... Looks nice to me.
>>
>> R600 backend will be part of LLVM 3.3 anyways, and this can be used in
>> the future without patching anything.
>>
>> I am attaching patches for llvm and mesa PKGBUILDs to incorporate these
>> changes. Do as you may please.
>>
>> If someone is interested in forwarding this to -dev-public list it would
>> be nice.
>>
>> Have a nice evening.
>>
>> (As a side note, somehow llvm tarball sha256sum was wrong when I
>> downloaded it).
>>
>> [1] http://lists.freedesktop.org/archives/mesa-dev/2013-March/035561.html
> 
> Hm, it seems that attachments are blocked
> 
> mesa.patch http://paste.debian.net/plainh/638c2e73
> llvm.patch http://paste.debian.net/plainh/bd11c4da
> 
> As another side note, the 0003 patch available on Tom Stellard's web
> site fails to apply with "patch already applied".
> 

This is known.  I understand we are waiting for LLVM-3.3.



More information about the arch-general mailing list