summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannik Glückert <jannik.glueckert@gmail.com>2022-06-22 13:15:39 +0200
committerSam James <sam@gentoo.org>2022-06-28 08:34:35 +0100
commitcd9e814fc88a9d2c2ba427fef950cebbae2f6edb (patch)
tree4d013e75c1205f40425567d6eebefb7dc2ea2920 /eclass/flag-o-matic.eclass
parentwww-client/firefox-bin: add 102.0, drop 101.0.1 (diff)
downloadgentoo-cd9e814fc88a9d2c2ba427fef950cebbae2f6edb.tar.gz
gentoo-cd9e814fc88a9d2c2ba427fef950cebbae2f6edb.tar.bz2
gentoo-cd9e814fc88a9d2c2ba427fef950cebbae2f6edb.zip
flag-o-matic.eclass: add filter-lto function
Bug: https://bugs.gentoo.org/618550 Closes: https://github.com/gentoo/gentoo/pull/26036 Signed-off-by: Jannik Glückert <jannik.glueckert@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 50caa401bacf..0e15d7423547 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -218,6 +218,14 @@ filter-lfs-flags() {
filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_TIME_BITS=64
}
+# @FUNCTION: filter-lto
+# @DESCRIPTION:
+# Remove flags that enable LTO and those that depend on it
+filter-lto() {
+ [[ $# -ne 0 ]] && die "filter-lto takes no arguments"
+ filter-flags '-flto*' -fwhole-program-vtables '-fsanitize=cfi*'
+}
+
# @FUNCTION: filter-ldflags
# @USAGE: <flags>
# @DESCRIPTION: