/[gentoo-x86]/eclass/flag-o-matic.eclass
Gentoo

Diff of /eclass/flag-o-matic.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.84 Revision 1.85
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.84 2005/03/18 03:48:14 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.85 2005/04/06 23:29:23 vapier Exp $
4 4
5ECLASS=flag-o-matic 5ECLASS=flag-o-matic
6INHERITED="$INHERITED $ECLASS" 6INHERITED="$INHERITED $ECLASS"
7 7
8IUSE="debug" 8IUSE="debug"
440# bug #9016. Also thanks to Jukka Salmi <salmi@gmx.net> (bug #13907) for more 440# bug #9016. Also thanks to Jukka Salmi <salmi@gmx.net> (bug #13907) for more
441# fixes. 441# fixes.
442# 442#
443# Export CFLAGS and CXXFLAGS that are compadible with gcc-2.95.3 443# Export CFLAGS and CXXFLAGS that are compadible with gcc-2.95.3
444gcc2-flags() { 444gcc2-flags() {
445 CFLAGS=${CFLAGS//pentium-mmx/i586} 445 if [[ $(tc-arch) == "x86" || $(tc-arch) == "amd64" ]] ; then
446 CFLAGS=${CFLAGS//pentium[234]/i686} 446 CFLAGS=${CFLAGS//-mtune=/-mcpu=}
447 CFLAGS=${CFLAGS//k6-[23]/k6} 447 CXXFLAGS=${CXXFLAGS//-mtune=/-mcpu=}
448 CFLAGS=${CFLAGS//athlon-tbird/i686}
449 CFLAGS=${CFLAGS//athlon-4/i686}
450 CFLAGS=${CFLAGS//athlon-[xm]p/i686}
451 CFLAGS=${CFLAGS//athlon/i686}
452
453 CXXFLAGS=${CXXFLAGS//pentium-mmx/i586}
454 CXXFLAGS=${CXXFLAGS//pentium[234]/i686}
455 CXXFLAGS=${CXXFLAGS//k6-[23]/k6}
456 CXXFLAGS=${CXXFLAGS//athlon-tbird/i686}
457 CXXFLAGS=${CXXFLAGS//athlon-4/i686}
458 CXXFLAGS=${CXXFLAGS//athlon-[xm]p/i686}
459 CXXFLAGS=${CXXFLAGS//athlon/i686}
460
461 if [[ $(tc-arch) == "alpha" ]] ; then
462 CHOST=${CHOST/#alphaev6[78]/alphaev6}
463 CFLAGS=${CFLAGS//ev6[78]/ev6}
464 CXXFLAGS=${CXXFLAGS//ev6[78]/ev6}
465 fi 448 fi
449
450 replace-cpu-flags k6-{2,3} k6
451 replace-cpu-flags athlon{,-{tbird,4,xp,mp}} i686
452
453 replace-cpu-flags pentium-mmx i586
454 replace-cpu-flags pentium{2,3,4} i686
455
456 replace-cpu-flags ev6{7,8} ev6
466 457
467 export CFLAGS CXXFLAGS 458 export CFLAGS CXXFLAGS
468} 459}

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85

  ViewVC Help
Powered by ViewVC 1.1.20