> On Dec 18, 2018, at 1:08 PM, James Feist <james.fe...@linux.intel.com> wrote:
> 
> If you aren't planning on enabling flto in a repo you can ignore this email.
> 
> 
> I've created a new class flto-automake 
> https://github.com/openbmc/meta-phosphor/blob/master/classes/flto-automake.bbclass
>  if you are enabling -flto in an autotools project you might be interested 
> in. When using static libraries you may run into undefined references when 
> building with Yocto. Yocto by default uses:
> 
> export AR = "${HOST_PREFIX}ar"
> export RANLIB = "${HOST_PREFIX}ranlib"
> 
> for AR and RANLIB. This new class replaces these with the gcc equivalent 
> wrappers that can work with the flto object files. This doesn't seem to be an 
> issue for the CI build, it only shows up for Yocto builds. Reference: 
> http://stackoverflow.com/questions/25878407/how-can-i-use-lto-with-static-libraries#comment67660913_25878408
> 
> For Cmake I suggest looking at the way bmcweb handles it in CMakesLists:
> https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L92
> 
> Thanks,
> 
> James

Thanks James

I wonder if this is something they would be interested in upstream.  I’ve copied
the oe-core mailing list for possible comment.

-brad
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to