[Mesa-dev] [PATCH] util/disk_cache: fix zlib linking with LTO build
Matt Turner
mattst88 at gmail.com
Sat Mar 11 16:45:23 UTC 2017
On Sat, Mar 11, 2017 at 7:31 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 10 March 2017 at 13:36, Steven Newbury <steve at snewbury.org.uk> wrote:
>> On Fri, 2017-03-10 at 12:11 +0000, Emil Velikov wrote:
>>> On 9 March 2017 at 14:39, Steven Newbury <steve at snewbury.org.uk>
>>> wrote:
>>> > Introduction of zlib compression for the shader cache means
>>> > zlib needs to be explicitly linked to libOSMesa and libstandalone
>>> > otherwise build fails when LTO is used.
>>> > ---
>>>
>>> How exactly are you doing the LTO build ?
>> I build everything LTO, except for a short blacklist where
>> unsupportable. Specifically, on this system my global *FLAGS contain
>> "-flto=8 -fuse-linker-plugin". I have the lto linker plugin symlinked
>> into "/usr/$CHOST/binutils-bin/lib/bfd-plugins/".
>>
>> I also have have the following env vars set to ensure they are called
>> with the LTO plugin:
>> AR="gcc-ar"
>> NM="gcc-nm"
>> RANLIB="gcc-ranlib"
>>
> One should not need these. Have you checked that the issue is
> reproducible w/o them ?
I think they are necessary
https://gcc.gnu.org/ml/gcc-help/2012-03/msg00100.html
(though I don't know under which circumstances precisely)
FWIW, I agree that this patch looks like a hack.
More information about the mesa-dev
mailing list