*/*: Added LTO use flag, respecting environment

Closes: https://bugs.gentoo.org/887427
Closes: https://bugs.gentoo.org/887429
Signed-off-by: Denis Reva <denis7774@gmail.com>
This commit is contained in:
Denis Reva
2022-12-27 19:20:35 +05:00
parent b53c113142
commit 83488982f8
4 changed files with 72 additions and 1 deletions

View File

@@ -14,8 +14,12 @@ S="${WORKDIR}/${MY_P}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="lto"
PATCHES=( "${FILESDIR}/${PN}-2020.11.08_Remove-TTY-check-in-test.patch" )
PATCHES=(
"${FILESDIR}/${PN}-2020.11.08_Remove-TTY-check-in-test.patch"
"${FILESDIR}/${PN}-2021-03-27-respect-env.patch"
)
src_prepare() {
sed -i \
@@ -34,3 +38,11 @@ src_prepare() {
default
}
src_compile() {
if use lto; then
CONFIG_LTO=$(use lto) emake
else
emake
fi
}