I apologize for the lack of updates.
I haven't really had time for FOSS in a while.
If I find some, I will add BOLT (llvm only?) and I need to revise the pgo routine, maybe revisit lto.
Somehow, the concept of using the same "pgo" flag for one profiling phase and then a second phase to apply optimizations keeps getting broken by changes in pacman's behavior.
Although lto is now standard, there are some more extreme options I would like to tack on.
As for upstream, your best bet would be my GitHub, but you will find the same files there. I understand things are not to be "AUR hosted", but this is all there ever was: a PKGBUILD and some scripts it wraps up.
It there any proper upstream URL instrad of wiki?
@j1simon
I will err on the side of letting upstream deal with it, and have updated makepkg-optimize removing my own lto routine.
This means you may use one provided by pacman, in 'OPTIONS', and report problems with it to pacman's developers.
Edit: I am still shipping mine in git, btw, if you want to make some comparisons.
@quequotion in short, if I want to compile using makepkg-optimize with lto, should I activate it in BUILDENV, OPTIONS or both?
@j1simon
I finally understand what you are asking about.
Ten months ago, Allan McRae added lto, as a build option, upstream.
This was not available in pacman when I published makepkg-optimize and has probably only recently come out in a stable release.
Looking over his script, it will probably work, but I wonder about the choices that went into this implementation.
First of all, it just sets "-flto". For GCC, that actually means flto "thin" (a strategy is used to reduce memory usage during compilation that can reduce optimization; GCC decided to change this to their default while clang has not, last I checked). My version distinguishes actual flto from flto-thin.
Another issue is that it makes no distinction between GCC or clang, which passes up an opportunity to save time with GCC by disabling fat objects..
Finally, it does nothing with the LTO plugin. To be honest, my implementation here is ancient. I can no longer find the thing it is based on (an older article about LTO in the Gentoo wiki, which no longer exists, couldn't drege up whatever scripts their build system uses now). I do not know if the plugin is relevant today; it was always hard to get anyone to notice its existence.
Edit: plus one, it shouldn't be an issue, but it was an issue: I had renamed this file "ZZ-lto.sh" because of a timing issue with setting the flags in addition to flags set by other libmakepkg routines (such as those provided here).
What's the point of lto in BUILDENV and OPTIONS?