Skip to content

Reconsider clearing `MAKEFLAGS` when `!buildflags` is used

Description:

As of pacman/pacman@09e82f01 using options=(!buildflags) also clears MAKEFLAGS. I am not sure whether this change was intentional. Before MAKEFLAGS where preserved and !buildflags only cleared other variables such as CFLAGS. The !buildflags option is very useful for cross compilation (e.g. for the many mingw-w64-* and android-* packages found in the AUR). However, the previous behavior of still preserving MAKEFLAGS made much more sense because flags like -j$(nproc) can and should still apply for those cross-packages.

So it would be nice to reconsider this change and preserve MAKEFLAGS again (despite !buildflags). It looks like this change was not intentional anyway because the mentioned change is focusing on Rust.

Additional info:

In case anybody else wants to build those cross-packages with custom MAKEFLAGS, here's my current workaround: https://github.com/Martchus/PKGBUILDs/tree/master/buildenv/default

I personally was fine using the mentioned workaround but considering this affects probably many people's builds (e.g. see this discussion on GitHub) it would probably be better if pacman would do the right thing for this use case again out of the box.

Edited by Toolybird
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information