From: Mike Frysinger Date: Wed, 13 Oct 2004 14:11:52 +0000 (+0000) Subject: move gcc2-flags out of gcc.eclass and into flag-o-matic X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=76a20eedb622299cb53a15d4d64187fae617e87d;p=gentoo.git move gcc2-flags out of gcc.eclass and into flag-o-matic --- diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index fe9f66b89978..014b69bb3a87 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.72 2004/10/09 18:28:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.73 2004/10/13 14:11:52 vapier Exp $ # # Author Bart Verwilst @@ -440,3 +440,34 @@ fstack-flags() { fi return 0 } + +# This is thanks to great work from Paul de Vrieze , +# bug #9016. Also thanks to Jukka Salmi (bug #13907) for more +# fixes. +# +# Export CFLAGS and CXXFLAGS that are compadible with gcc-2.95.3 +gcc2-flags() { + CFLAGS=${CFLAGS//pentium-mmx/i586} + CFLAGS=${CFLAGS//pentium[234]/i686} + CFLAGS=${CFLAGS//k6-[23]/k6} + CFLAGS=${CFLAGS//athlon-tbird/i686} + CFLAGS=${CFLAGS//athlon-4/i686} + CFLAGS=${CFLAGS//athlon-[xm]p/i686} + CFLAGS=${CFLAGS//athlon/i686} + + CXXFLAGS=${CXXFLAGS//pentium-mmx/i586} + CXXFLAGS=${CXXFLAGS//pentium[234]/i686} + CXXFLAGS=${CXXFLAGS//k6-[23]/k6} + CXXFLAGS=${CXXFLAGS//athlon-tbird/i686} + CXXFLAGS=${CXXFLAGS//athlon-4/i686} + CXXFLAGS=${CXXFLAGS//athlon-[xm]p/i686} + CXXFLAGS=${CXXFLAGS//athlon/i686} + + if [ "$ARCH" = alpha ]; then + CHOST=${CHOST/#alphaev6[78]/alphaev6} + CFLAGS=${CFLAGS//ev6[78]/ev6} + CXXFLAGS=${CXXFLAGS//ev6[78]/ev6} + fi + + export CFLAGS CXXFLAGS +}