public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-dev] [PATCH 2/2] flag-o-matic.eclass: add filter-lto function
  @ 2022-06-27  7:04 99% ` Sam James
  0 siblings, 0 replies; 1+ results
From: Sam James @ 2022-06-27  7:04 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Jannik Glückert, Sam James

From: Jannik Glückert <jannik.glueckert@gmail.com>

Signed-off-by: Jannik Glückert <jannik.glueckert@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26036
Signed-off-by: Sam James <sam@gentoo.org>
---
 eclass/flag-o-matic.eclass | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index eca39cd2bdfdc..9624af93c963e 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:
-- 
2.36.1



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-06-27  7:04     [gentoo-dev] [PATCH 1/2] flag-o-matic.eclass: have is-flagq respect succeeding -fno-flag Sam James
2022-06-27  7:04 99% ` [gentoo-dev] [PATCH 2/2] flag-o-matic.eclass: add filter-lto function Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox