<div dir="ltr">For what its worth I compile Mesa using LTO with the gold linker so I don't need to specify -fuse-linker-plugin - everything works fine here<div><br></div><div><span style="font-family:monospace">CFLAGS="-O3 -march=skylake -pipe -flto=8"
<br>CXXFLAGS="${CFLAGS}"
<br>LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-flto=8"<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">AR="gcc-ar"
<br>NM="gcc-nm"
<br>RANLIB="gcc-ranlib"<br>
<br></span></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, 11 Mar 2017 at 16:46 Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Mar 11, 2017 at 7:31 AM, Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com" class="gmail_msg" target="_blank">emil.l.velikov@gmail.com</a>> wrote:<br class="gmail_msg">
> On 10 March 2017 at 13:36, Steven Newbury <<a href="mailto:steve@snewbury.org.uk" class="gmail_msg" target="_blank">steve@snewbury.org.uk</a>> wrote:<br class="gmail_msg">
>> On Fri, 2017-03-10 at 12:11 +0000, Emil Velikov wrote:<br class="gmail_msg">
>>> On 9 March 2017 at 14:39, Steven Newbury <<a href="mailto:steve@snewbury.org.uk" class="gmail_msg" target="_blank">steve@snewbury.org.uk</a>><br class="gmail_msg">
>>> wrote:<br class="gmail_msg">
>>> > Introduction of zlib compression for the shader cache means<br class="gmail_msg">
>>> > zlib needs to be explicitly linked to libOSMesa and libstandalone<br class="gmail_msg">
>>> > otherwise build fails when LTO is used.<br class="gmail_msg">
>>> > ---<br class="gmail_msg">
>>><br class="gmail_msg">
>>> How exactly are you doing the LTO build ?<br class="gmail_msg">
>> I build everything LTO, except for a short blacklist where<br class="gmail_msg">
>> unsupportable.  Specifically, on this system my global *FLAGS contain<br class="gmail_msg">
>> "-flto=8 -fuse-linker-plugin".  I have the lto linker plugin symlinked<br class="gmail_msg">
>> into "/usr/$CHOST/binutils-bin/lib/bfd-plugins/".<br class="gmail_msg">
>><br class="gmail_msg">
>> I also have have the following env vars set to ensure they are called<br class="gmail_msg">
>> with the LTO plugin:<br class="gmail_msg">
>> AR="gcc-ar"<br class="gmail_msg">
>> NM="gcc-nm"<br class="gmail_msg">
>> RANLIB="gcc-ranlib"<br class="gmail_msg">
>><br class="gmail_msg">
> One should not need these. Have you checked that the issue is<br class="gmail_msg">
> reproducible w/o them ?<br class="gmail_msg">
<br class="gmail_msg">
I think they are necessary<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://gcc.gnu.org/ml/gcc-help/2012-03/msg00100.html" rel="noreferrer" class="gmail_msg" target="_blank">https://gcc.gnu.org/ml/gcc-help/2012-03/msg00100.html</a><br class="gmail_msg">
<br class="gmail_msg">
(though I don't know under which circumstances precisely)<br class="gmail_msg">
<br class="gmail_msg">
FWIW, I agree that this patch looks like a hack.<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
mesa-dev mailing list<br class="gmail_msg">
<a href="mailto:mesa-dev@lists.freedesktop.org" class="gmail_msg" target="_blank">mesa-dev@lists.freedesktop.org</a><br class="gmail_msg">
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br class="gmail_msg">
</blockquote></div>