commit:     db06a6d8427025c96b4f1ddccd1fdb40f8c14219
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  2 00:51:28 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct  2 00:52:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db06a6d8

dev-lang/gnat-gpl: strip unsupported flags, etc.

Same as we do in dev-lang/ada-bootstrap -- this is very brittle
and we want to do as much as we can to keep it working.

See 9a089ae37edf29aa5956932209751379a1bceb21 too.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild 
b/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild
index d3fa9bbf092e..442fabf6223f 100644
--- a/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild
+++ b/dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild
@@ -35,7 +35,7 @@ GCC_TARBALL_SRC_URI="
                )
        )"
 
-inherit toolchain-funcs toolchain
+inherit flag-o-matic toolchain-funcs toolchain
 
 DESCRIPTION="GNAT Ada Compiler - GPL version"
 HOMEPAGE="http://libre.adacore.com/";
@@ -145,7 +145,15 @@ src_prepare() {
 
 src_configure() {
        export PATH=${PWD}/bin:${PATH}
+
+       # This version is GCC 4.7.4 with a bolted-on newer GNAT; be very
+       # conservative, we just want it to build for bootstrapping proper
+       # sys-devel/gcc[ada]. We don't need it to be fast.
+       strip-flags
+       strip-unsupported-flags
+       filter-lto
        downgrade_arch_flags "$(gcc-version)"
+
        toolchain_src_configure
 }
 

Reply via email to