fix ARM --with-fpu option checking and error message
authorAlexandre Oliva <oliva@adacore.com>
Thu, 20 Jun 2019 05:55:34 +0000 (05:55 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 20 Jun 2019 05:55:34 +0000 (05:55 +0000)
Fix the test for failure in parsecpu's checking of the --with-fpu
argument, and the error message that gets printed when the check
fails.

for  gcc/ChangeLog

* config.gcc: Fix ARM --with-fpu checking and error message.

From-SVN: r272496

gcc/ChangeLog
gcc/config.gcc

index 5b67ad0ede3070f9ac124f923c8756f92b7f6a40..e69a0fc410a8d08fd19c69ead7b75a17925a0b1d 100644 (file)
@@ -1,3 +1,7 @@
+2019-06-20  Alexandre Oliva <oliva@adacore.com>
+
+       * config.gcc: Fix ARM --with-fpu checking and error message.
+
 2019-06-19  Marek Polacek  <polacek@redhat.com>
 
        PR c++/60364 - noreturn after first decl not diagnosed.
index fda048dc12b1655c8d6a6cca38cf54f2d10f4c1d..7119698779fd21161bc2de4d88e8f618a73c4cee 100644 (file)
@@ -4002,12 +4002,13 @@ case "${target}" in
 
                # see if --with-fpu matches any of the supported FPUs
                if [ x"$with_fpu" != x ] ; then
+                 val=$with_fpu
                  fpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
-                       -v cmd="chkfpu $with_fpu" \
+                       -v cmd="chkfpu $val" \
                        ${srcdir}/config/arm/arm-cpus.in`
-                 if [ "$fpu" = "error"]
+                 if [ "$fpu" = "error" ]
                  then
-                   echo "Unknown target in --with-$which=$val" 1>&2
+                   echo "Unknown target in --with-fpu=$val" 1>&2
                    exit 1
                  fi
                fi