Package Details: makepkg-optimize 21-1

Git Clone URL: https://aur.archlinux.org/makepkg-optimize.git (read-only, click to copy)
Package Base: makepkg-optimize
Description: Supplemental build and packaging optimizations for makepkg
Upstream URL: https://wiki.archlinux.org/index.php/Makepkg-optimize
Licenses: GPL
Submitter: quequotion
Maintainer: quequotion
Last Packager: quequotion
Votes: 19
Popularity: 0.45
First Submitted: 2016-03-20 15:08 (UTC)
Last Updated: 2022-01-09 15:05 (UTC)

Dependencies (6)

Required by (0)

Sources (20)

Pinned Comments

quequotion commented on 2019-02-27 07:49 (UTC) (edited on 2022-01-09 13:20 (UTC) by quequotion)

makepkg-optimize is a collection of libmakepkg tidy, buildenv, and executable extensions, and a supplement to pacman. These enable various optimization routines for building and packaging such as upx compression, profile guided optimization, polyhedral model optimization, etc..

Note: Over-optimization is a thing, and it is not good.

See the wiki article for details.

Note to packagers: makepkg-optmize's macros may be enabled or disabled in options() as well!

Latest Comments

1 2 3 4 5 6 7 Next › Last »

quequotion commented on 2025-12-31 14:19 (UTC)

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.

oech3 commented on 2025-07-16 15:15 (UTC)

It there any proper upstream URL instrad of wiki?

bartus commented on 2022-02-21 14:29 (UTC) (edited on 2022-02-21 14:34 (UTC) by bartus)

Any chance for including BOLT binary optimiser, it's has some substantial improvement potential over pgo+lto. https://www.phoronix.com/scan.php?page=news_item&px=LLVM-Lands-BOLT https://github.com/facebookincubator/BOLT/blob/main/bolt/docs/OptimizingClang.md

quequotion commented on 2022-01-09 13:09 (UTC) (edited on 2022-01-09 13:50 (UTC) by quequotion)

@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.

j1simon commented on 2022-01-09 11:56 (UTC)

@quequotion in short, if I want to compile using makepkg-optimize with lto, should I activate it in BUILDENV, OPTIONS or both?

quequotion commented on 2022-01-09 09:57 (UTC) (edited on 2022-01-09 12:57 (UTC) by quequotion)

@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).

j1simon commented on 2021-12-29 08:31 (UTC)

What's the point of lto in BUILDENV and OPTIONS?