summaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-30 20:29:23 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-30 20:29:23 +0000
commit1cfd705ec9ac186caf8d8a8bc2489ab20f7b3c69 (patch)
tree4986411047b9a9c6330be11c24894f336ef31e34 /gcc/config.gcc
parentaf1e1452a5a2bedbfccf57943271cdb903a14bba (diff)
downloadgcc-1cfd705ec9ac186caf8d8a8bc2489ab20f7b3c69.tar.gz
* config.gcc: Simplify arm --with-{cpu,tune} test.
* config/arm/arm-cores.def: Document whitespace restrictions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81365 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc20
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index f05d2504473..844624c0a1e 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2223,17 +2223,15 @@ fi
for which in cpu tune; do
# See if it matches any of the entries in arm-cores.def
eval "val=\$with_$which"
- [ x"$val" = x ] && val=unset
- for opt in `sed -e '/ARM_CORE/!d' \
- -e 's/ARM_CORE(\([^,]*\),.*$/\1/' \
- ${srcdir}/config/arm/arm-cores.def` unset .
- do
- [ x$opt = x"$val" ] && break
- done
- if [ $opt = . ]; then
- echo "Unknown CPU used in --with-$which=$val" 1>&2
- exit 1
-
+ if [ x"$val" = x ] \
+ || grep "^ARM_CORE($val," \
+ ${srcdir}/config/arm/arm-cores.def \
+ > /dev/null; then
+ # Ok
+ true
+ else
+ echo "Unknown CPU used in --with-$which=$val" 1>&2
+ exit 1
fi
done