Same as #4584 but with an additional backport: https://github.com/msys2/msys2-pacman/pull/49 Old message: See msys2/msys2-pacman#45 makepkg.conf synced with the upstream version: https://gitlab.archlinux.org/pacman/pacman/-/blob/v6.1.0/etc/makepkg.conf.in Skip patches only changing CI configs
29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
From c80c2de8798202bf05575fb050883dd78a64f7c3 Mon Sep 17 00:00:00 2001
|
|
From: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
|
|
Date: Sat, 13 Nov 2021 08:27:49 +0100
|
|
Subject: [PATCH 23/N] Fix building staticlibs with LTO
|
|
|
|
Unless `-ffat-lto-objects` get passed to the compiler, It will only generate LTO bytecode.
|
|
|
|
see:
|
|
https://wiki.ubuntu.com/ToolChain/LTO : Implementation
|
|
https://fedoraproject.org/wiki/Changes/LTOBuildImprovements
|
|
---
|
|
scripts/libmakepkg/buildenv/lto.sh.in | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/scripts/libmakepkg/buildenv/lto.sh.in b/scripts/libmakepkg/buildenv/lto.sh.in
|
|
index 7fc12a5..fd3bb65 100644
|
|
--- a/scripts/libmakepkg/buildenv/lto.sh.in
|
|
+++ b/scripts/libmakepkg/buildenv/lto.sh.in
|
|
@@ -35,5 +35,9 @@ buildenv_lto() {
|
|
append_once CFLAGS "${LTOFLAGS:--flto}"
|
|
append_once CXXFLAGS "${LTOFLAGS:--flto}"
|
|
append_once LDFLAGS "${LTOFLAGS:--flto}"
|
|
+ if check_option "staticlibs" "y"; then
|
|
+ append_once CFLAGS "-ffat-lto-objects"
|
|
+ append_once CXXFLAGS "-ffat-lto-objects"
|
|
+ fi
|
|
fi
|
|
}
|