summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-15 00:10:02 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-15 00:10:02 +0000
commit4e8d54268325e71f1693163c247cea56b5985a44 (patch)
tree52aba8eee010efc119e1f69b69cf74da1ba49b64 /eclass
parent1.2.3 stable on mips. (diff)
downloadhistorical-4e8d54268325e71f1693163c247cea56b5985a44.tar.gz
historical-4e8d54268325e71f1693163c247cea56b5985a44.tar.bz2
historical-4e8d54268325e71f1693163c247cea56b5985a44.zip
dont use gcc.eclass anymore
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gcc.eclass135
1 files changed, 1 insertions, 134 deletions
diff --git a/eclass/gcc.eclass b/eclass/gcc.eclass
index a286ee1eb89a..2d843db9f54a 100644
--- a/eclass/gcc.eclass
+++ b/eclass/gcc.eclass
@@ -1,141 +1,8 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gcc.eclass,v 1.22 2005/07/06 20:23:20 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gcc.eclass,v 1.23 2005/09/15 00:10:02 vapier Exp $
# STOP USING THIS ECLASS
# PLEASE TRANSITION TO TOOLCHAIN-FUNCS.ECLASS
ewarn "Please upgrade your package (${PF}) to use toolchain-funcs.eclass"
-
-
-# Author: Martin Schlemmer <azarah@gentoo.org>
-#
-# This eclass contains (or should) functions to get common info about gcc
-
-inherit eutils
-
-
-DEPEND="${DEPEND} sys-devel/gcc"
-
-DESCRIPTION="Based on the ${ECLASS} eclass"
-
-# NOTE: To force gcc3 if multi ver install, do: export WANT_GCC_3="yes"
-[ -z "${WANT_GCC_3}" ] && export WANT_GCC_3="no"
-
-# Returns the name of the C compiler binary
-gcc-getCC() {
- if [ "${WANT_GCC_3}" = "yes" -o -z "${CC}" ] ; then
- local CC="gcc"
-
- if [ "$(${CC} -dumpversion | cut -f1 -d.)" -ne 3 ] && \
- [ "${WANT_GCC_3}" = "yes" ]
- then
- # We use the dual/multiple install of gcc-3.x if the user
- # have 2.95.3 as base
- if [ -x /usr/bin/gcc-3.2 ] ; then
- CC="gcc-3.2"
- elif [ -x /usr/bin/gcc-3.1 ] ; then
- CC="gcc-3.1"
- elif [ -x /usr/bin/gcc-3.0 ] ; then
- CC="gcc-3.0"
- fi
- fi
- fi
-
- echo "${CC}"
-}
-
-# Returns the name of the C++ compiler binary
-gcc-getCXX() {
- if [ "${WANT_GCC_3}" = "yes" -o -z "${CXX}" ] ; then
- local CC="$(gcc-getCC)"
-
- if [ "$(${CC} -dumpversion | cut -f1 -d.)" -ge 3 ] ; then
- echo "${CC/gcc/g++}"
- else
- echo "${CC}"
- fi
- else
- echo "${CXX}"
- fi
-}
-
-# Returns the version as by `$CC -dumpversion`
-gcc-fullversion() {
- echo "$($(gcc-getCC) -dumpversion)"
-}
-
-# Returns the version, but only the <major>.<minor>
-gcc-version() {
- echo "$(gcc-fullversion | cut -f1,2 -d.)"
-}
-
-# Returns the Major version
-gcc-major-version() {
- echo "$(gcc-version | cut -f1 -d.)"
-}
-
-# Returns the Minor version
-gcc-minor-version() {
- echo "$(gcc-version | cut -f2 -d.)"
-}
-
-# Returns the Micro version
-gcc-micro-version() {
- echo "$(gcc-fullversion | cut -f3 -d.)"
-}
-
-# Returns gcc's internal library path
-gcc-libpath() {
- echo "/usr/$(get_libdir)/gcc-lib/$($(gcc-getCC) -dumpmachine)/$(gcc-fullversion)"
-}
-
-# Returns the full version of libstdc++.so
-gcc-libstdcxx-version() {
- if [ "$(gcc-major-version)" -ge 3 ] ; then
- local libstdcxx="$(ls $(gcc-libpath)/libstdc++.so.?.?.?)"
-
- libstdcxx="${libstdcxx##*/}"
- echo "${libstdcxx/libstdc++.so.}"
- else
- echo
- fi
-}
-
-# Returns the Major version of libstdc++.so
-gcc-libstdcxx-major-version() {
- echo "$(echo $(gcc-libstdcxx-version) | cut -f1 -d.)"
-}
-
-# This is thanks to great work from Paul de Vrieze <gentoo-user@devrieze.net>,
-# bug #9016. Also thanks to Jukka Salmi <salmi@gmx.net> (bug #13907) for more
-# fixes.
-#
-# Export CFLAGS and CXXFLAGS that are compadible with gcc-2.95.3
-gcc2-flags() {
- ewarn "Please upgrade your package to use flag-o-matic.eclass"
-
- 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
-}