diff options
author | Chris White <chriswhite@gentoo.org> | 2005-02-04 21:24:53 +0000 |
---|---|---|
committer | Chris White <chriswhite@gentoo.org> | 2005-02-04 21:24:53 +0000 |
commit | 4b723c6c9409be5551ac33c1a7f933e47aea5b30 (patch) | |
tree | a462bb0b061445196c973605f1f5fad296edf7cb /eclass/eutils.eclass | |
parent | add support for beta2 (diff) | |
download | gentoo-2-4b723c6c9409be5551ac33c1a7f933e47aea5b30.tar.gz gentoo-2-4b723c6c9409be5551ac33c1a7f933e47aea5b30.tar.bz2 gentoo-2-4b723c6c9409be5551ac33c1a7f933e47aea5b30.zip |
Yah, I tested it this time as the CROSSCOMPILE variable detection was still b0rk3d, and I did some of the recommendations that were left in the eclass. If this breaks.. I'll eat my shoe (and I will >:|).
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 8a7641f678ed..bce85bb1f805 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.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/eutils.eclass,v 1.148 2005/02/03 23:55:05 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.149 2005/02/04 21:24:53 chriswhite Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # @@ -38,24 +38,22 @@ ecpu_check() { # and dropping the else if you do not plan on adding anything to that # empty block .... # PS: also try to add some quoting, and consider rather using ${foo} than $foo ... - if [ $CROSSCOMPILE -eq 1 ] || [ ! -e /proc/cpuinfo ] + if [ "${CROSSCOMPILE}" != "1" -a -e "/proc/cpuinfo" ] then - : - else - CPU_FLAGS=$1 + CPU_FLAGS=${1} USER_CPU=`grep "flags" /proc/cpuinfo` for flags in `seq 1 ${#CPU_FLAGS[@]}` do - if has ${CPU_FLAGS[$flags - 1]} $USER_CPU && ! has ${CPU_FLAGS[$flags - 1]} $USE + if has ${CPU_FLAGS[${flags} - 1]} ${USER_CPU} && ! has ${CPU_FLAGS[${flags} - 1]} ${USE} then - ewarn "Your system is ${CPU_FLAGS[$flags - 1]} capable but you don't have it enabled!" + ewarn "Your system is ${CPU_FLAGS[${flags} - 1]} capable but you don't have it enabled!" ewarn "You might be cross compiling (in this case set CROSSCOMPILE to 1 to disable this warning." fi - if ! has ${CPU_FLAGS[$flags - 1]} $USER_CPU && has ${CPU_FLAGS[$flags -1]} $USE + if ! has ${CPU_FLAGS[${flags} - 1]} ${USER_CPU} && has ${CPU_FLAGS[${flags} -1]} ${USE} then - ewarn "You have ${CPU_FLAGS[$flags - 1]} support enabled but your processor doesn't" + ewarn "You have ${CPU_FLAGS[${flags} - 1]} support enabled but your processor doesn't" ewarn "Seem to support it! You might be cross compiling or do not have /proc filesystem" ewarn "enabled. If either is the case, set CROSSCOMPILE to 1 to disable this warning." fi |