/[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.72 Revision 1.73
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.72 2004/10/09 18:28:46 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.73 2004/10/13 14:11:52 vapier Exp $
4# 4#
5# Author Bart Verwilst <verwilst@gentoo.org> 5# Author Bart Verwilst <verwilst@gentoo.org>
6 6
7ECLASS=flag-o-matic 7ECLASS=flag-o-matic
8INHERITED="$INHERITED $ECLASS" 8INHERITED="$INHERITED $ECLASS"
438 [ -z "`is-flag -fno-stack-protector`" ] && 438 [ -z "`is-flag -fno-stack-protector`" ] &&
439 export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`" 439 export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`"
440 fi 440 fi
441 return 0 441 return 0
442} 442}
443
444# This is thanks to great work from Paul de Vrieze <gentoo-user@devrieze.net>,
445# bug #9016. Also thanks to Jukka Salmi <salmi@gmx.net> (bug #13907) for more
446# fixes.
447#
448# Export CFLAGS and CXXFLAGS that are compadible with gcc-2.95.3
449gcc2-flags() {
450 CFLAGS=${CFLAGS//pentium-mmx/i586}
451 CFLAGS=${CFLAGS//pentium[234]/i686}
452 CFLAGS=${CFLAGS//k6-[23]/k6}
453 CFLAGS=${CFLAGS//athlon-tbird/i686}
454 CFLAGS=${CFLAGS//athlon-4/i686}
455 CFLAGS=${CFLAGS//athlon-[xm]p/i686}
456 CFLAGS=${CFLAGS//athlon/i686}
457
458 CXXFLAGS=${CXXFLAGS//pentium-mmx/i586}
459 CXXFLAGS=${CXXFLAGS//pentium[234]/i686}
460 CXXFLAGS=${CXXFLAGS//k6-[23]/k6}
461 CXXFLAGS=${CXXFLAGS//athlon-tbird/i686}
462 CXXFLAGS=${CXXFLAGS//athlon-4/i686}
463 CXXFLAGS=${CXXFLAGS//athlon-[xm]p/i686}
464 CXXFLAGS=${CXXFLAGS//athlon/i686}
465
466 if [ "$ARCH" = alpha ]; then
467 CHOST=${CHOST/#alphaev6[78]/alphaev6}
468 CFLAGS=${CFLAGS//ev6[78]/ev6}
469 CXXFLAGS=${CXXFLAGS//ev6[78]/ev6}
470 fi
471
472 export CFLAGS CXXFLAGS
473}

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73

  ViewVC Help
Powered by ViewVC 1.1.20