From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 42BA7158094 for ; Mon, 27 Jun 2022 07:06:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D65D5E0A76; Mon, 27 Jun 2022 07:05:40 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1625DE0A65 for ; Mon, 27 Jun 2022 07:05:40 +0000 (UTC) From: Sam James To: gentoo-dev@lists.gentoo.org Cc: toolchain@gentoo.org, =?UTF-8?q?Jannik=20Gl=C3=BCckert?= , Sam James Subject: [gentoo-dev] [PATCH 2/2] flag-o-matic.eclass: add filter-lto function Date: Mon, 27 Jun 2022 08:04:56 +0100 Message-Id: <20220627070456.1416244-2-sam@gentoo.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627070456.1416244-1-sam@gentoo.org> References: <20220627070456.1416244-1-sam@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: bfca89f5-e86d-4260-9208-555c45bb742b X-Archives-Hash: a2d9be5d50ab2dfce0280e2e9241a871 From: Jannik Glückert Signed-off-by: Jannik Glückert Closes: https://github.com/gentoo/gentoo/pull/26036 Signed-off-by: Sam James --- 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: # @DESCRIPTION: -- 2.36.1