media-libs/x264 is missing an option for lto. One more thing, the git repository has changed from: https://git.videolan.org/git/x264.git to: https://code.videolan.org/videolan/x264.git While the git.videolan.org mirror may still work, it being obsoleted. Thanks!
I just added filter-lto and added $(usex lto "--enable-lto" "") to the configure script bit. This does call filter-lto multiple times, which I don't think it strictly necessary. The configure flag seems to just pass -flto=auto when it's set, so unless we patch it, we don't need to handle whatever the user might want to use in their CFLAGS ... This seems to work
What's the advantage of this over just putting -flto into your make.conf COMMON_FLAGS?
I'm assuming there is no reason, then. Easy enough.