config.gcc: Simplify arm --with-{cpu,tune} test.
authorPaul Brook <paul@codesourcery.com>
Fri, 30 Apr 2004 20:29:23 +0000 (20:29 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Fri, 30 Apr 2004 20:29:23 +0000 (20:29 +0000)
* config.gcc: Simplify arm --with-{cpu,tune} test.
* config/arm/arm-cores.def: Document whitespace restrictions.

From-SVN: r81365

gcc/ChangeLog
gcc/config.gcc
gcc/config/arm/arm-cores.def

index f6a66b0a0c7c7afe0c74cf9352f5ea6092e5b5bd..b24e85876fba84fbb46f4c389d490a2d006a5e9d 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-30  Paul Brook  <paul@codesourcery.com>
+
+       * config.gcc: Simplify arm --with-{cpu,tune} test.
+       * config/arm/arm-cores.def: Document whitespace restrictions.
+
 2004-04-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        PR other/1963
index f05d2504473f9cc7acd587ec0611f2f20f77a854..844624c0a1e266058a1ded0685a5dfa96905eee6 100644 (file)
@@ -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
 
index eeb50aa31e96560fbb7abe873dd3cfda16c12d4f..e31bc12fc22ad6341fc492acd9473c4a171dd961 100644 (file)
@@ -31,7 +31,9 @@
    COSTS is the name of the rtx_costs routine to use.
 
    If you update this table, you must update the "tune" attribute in
-   arm.md.  */
+   arm.md.
+   
+   Some tools assume no writespace up to the first "," in each entry.  */
 
 ARM_CORE(arm2,         2,      FL_CO_PROC | FL_MODE26, slowmul)
 ARM_CORE(arm250,       2,      FL_CO_PROC | FL_MODE26, slowmul)