Proposal.
Add -ffat-lto-objects flag to LTOFLAGS to prevent mangling of static libs.(gcc)
If We add -ffat-lto-objects to LTOFLAGS, We don't have to worry about specifying lto options in makepkg.conf or PKGBUILD.
diff --git a/PKGBUILD b/PKGBUILD
index 7e96789..525e004 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -139,6 +139,11 @@ fi
export CFLAGS+=' -D_LARGEFILE64_SOURCE'
export CXXFLAGS+=' -D_LARGEFILE64_SOURCE'
+# Add -ffat-lto-objects flag to LTOFLAGS to prevent mangling of static libs.(gcc)
+# In clang-16, there seems to be no problem without this option specified.
+# (The -ffat-lto-objects option is planned to be supported from clang-17.)
+[[ $CC =~ gcc ]] && export LTOFLAGS+=" -fuse-linker-plugin -ffat-lto-objects"
+
# keep using xz-compressed packages, because one use of the package is to
# recover on systems with broken zstd support in libarchive
[[ $PKGEXT = .pkg.tar.zst ]] && PKGEXT=.pkg.tar.xz
Pinned Comments
Morganamilo commented on 2022-02-20 18:30 (UTC)
There's now a custom repo and binaries again. Though only for x86_64 currently.
Custom Repo
Pre compiled binaries
https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/