dev-lang/python: fix build with -flto in CFLAGS

Bug: https://bugs.gentoo.org/700012
Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
Mike Gilbert
2020-01-05 18:19:48 -05:00
parent 7632443c6e
commit 337c1cbdae
2 changed files with 11 additions and 1 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -110,6 +110,11 @@ src_configure() {
use hardened && replace-flags -O3 -O2
fi
# https://bugs.gentoo.org/700012
if is-flagq -flto; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
tc-export CXX
@@ -126,6 +126,11 @@ src_configure() {
use hardened && replace-flags -O3 -O2
fi
# https://bugs.gentoo.org/700012
if is-flagq -flto; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
tc-export CXX