commit:     95fb775e0475446b41cdda8609d1b843d891282b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May  8 14:53:00 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  8 18:46:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95fb775e

toolchain.eclass: conditionalize old awk sed fixup

Bug: https://bugs.gentoo.org/215828
Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35855
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 16ce534d3465..91592dcae2d6 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -731,8 +731,11 @@ toolchain_src_prepare() {
                        || eerror "Please file a bug about this"
                eend $?
        done
+
        # bug #215828
-       sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk || die
+       if ! tc_version_is_at_least 4.6.0 ; then
+               sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk || die
+       fi
 
        # Prevent new texinfo from breaking old versions (see #198182, bug 
#464008)
        einfo "Remove texinfo (bug #198182, bug #464008)"

Reply via email to