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: 17
Popularity: 0.000022
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 »

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?

nihilistzsche commented on 2021-06-08 07:55 (UTC) (edited on 2021-06-08 08:12 (UTC) by nihilistzsche)

https://bugs.archlinux.org/task/66226

According to this bug those options needed to be added for polly to work with Arch's clang.

EDIT:

Upon further reflection the better change is to add the necessary flags to the polly line and add check_buildoption "polly" "y" && to the beginning of the line.

In addition, the -freg-struct-return needs to be moved into the line check_buildoption "rice" "y" && because clang does not support it on x86_64 so should not be used I think with rice-clang.

brikler commented on 2021-03-06 17:47 (UTC) (edited on 2021-03-06 18:06 (UTC) by brikler)

@tjuh upx is more or less useless because most binaries are application/x-pie-executable and application/x-sharedlib, and this will fail with a NotCompressibleException or a CantPackException

Tjuh commented on 2021-03-05 01:00 (UTC)

Alright, thanks for clarifying. So does that mean that using upx to compress pkgs with makepkg is useless, since it will pretty much always fail?