summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-08-06 12:41:48 +0100
committerSam James <sam@gentoo.org>2023-08-06 12:47:53 +0100
commit5a84e57a1963e12919d9b843324d70b12e992bc7 (patch)
treeabc0045144b3582757e465de3d3f8df5775c1b9b
parentsys-power/switcheroo-control: Keyword 2.6-r2 arm64, #911784 (diff)
downloadgentoo-5a84e57a.tar.gz
gentoo-5a84e57a.tar.bz2
gentoo-5a84e57a.zip
dev-qt/qtcore: use tc-enables-fortify-source
Better than fragile optimisation level checking. Bug: https://bugs.gentoo.org/841770 Bug: https://bugs.gentoo.org/847145 Bug: https://bugs.gentoo.org/852974 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-qt/qtcore/qtcore-5.15.10-r1.ebuild5
-rw-r--r--dev-qt/qtcore/qtcore-5.15.10.ebuild7
2 files changed, 6 insertions, 6 deletions
diff --git a/dev-qt/qtcore/qtcore-5.15.10-r1.ebuild b/dev-qt/qtcore/qtcore-5.15.10-r1.ebuild
index f42cc15498c0..8153d9098fae 100644
--- a/dev-qt/qtcore/qtcore-5.15.10-r1.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.10-r1.ebuild
@@ -9,7 +9,7 @@ if [[ ${PV} != *9999* ]]; then
fi
QT5_MODULE="qtbase"
-inherit linux-info flag-o-matic qt5-build
+inherit linux-info flag-o-matic toolchain-funcs qt5-build
DESCRIPTION="Cross-platform application development framework"
SLOT=5/${QT5_PV}
@@ -60,6 +60,7 @@ src_prepare() {
sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die
# Broken with FORTIFY_SOURCE=3
+ #
# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
# to unset F_S first, then explicitly set 2, to negate any default
# and anything set by the user if they're choosing 3 (or if they've
@@ -70,7 +71,7 @@ src_prepare() {
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105709
# https://bugreports.qt.io/browse/QTBUG-103782
# bug #847145
- if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
+ if tc-enables-fortify-source ; then
# We can't unconditionally do this b/c we fortify needs
# some level of optimisation.
filter-flags -D_FORTIFY_SOURCE=3
diff --git a/dev-qt/qtcore/qtcore-5.15.10.ebuild b/dev-qt/qtcore/qtcore-5.15.10.ebuild
index 4964d74eb06f..606b3ffff929 100644
--- a/dev-qt/qtcore/qtcore-5.15.10.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.10.ebuild
@@ -9,7 +9,7 @@ if [[ ${PV} != *9999* ]]; then
fi
QT5_MODULE="qtbase"
-inherit linux-info flag-o-matic qt5-build
+inherit linux-info flag-o-matic toolchain-funcs qt5-build
DESCRIPTION="Cross-platform application development framework"
SLOT=5/${QT5_PV}
@@ -60,6 +60,7 @@ src_prepare() {
sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die
# Broken with FORTIFY_SOURCE=3
+ #
# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
# to unset F_S first, then explicitly set 2, to negate any default
# and anything set by the user if they're choosing 3 (or if they've
@@ -70,9 +71,7 @@ src_prepare() {
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105709
# https://bugreports.qt.io/browse/QTBUG-103782
# bug #847145
- if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
- # We can't unconditionally do this b/c we fortify needs
- # some level of optimisation.
+ if tc-enables-fortify-source ; then
filter-flags -D_FORTIFY_SOURCE=3
# (Qt doesn't seem to respect CPPFLAGS?)
append-flags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2