power10: Fix build issues due to perl scripts conversion
authorRajalakshmi Srinivasaraghavan <rajis@linux.ibm.com>
Thu, 2 Jun 2022 13:11:10 +0000 (08:11 -0500)
committerRajalakshmi Srinivasaraghavan <rajis@linux.ibm.com>
Thu, 2 Jun 2022 13:11:10 +0000 (08:11 -0500)
Due to recent perl script conversion, there are some build
errors when compiling openblas with advance toolchain compilers.

c_check
f_check

diff --git a/c_check b/c_check
index d2f2eb0..48fd14e 100755 (executable)
--- a/c_check
+++ b/c_check
@@ -304,7 +304,7 @@ link=`$compiler_name $flags -c ctest2.c -o ctest2.o 2>&1 && $compiler_name $flag
 link=`echo "$link" | sed 's/\-Y[[:space:]]P\,/\-Y/g'`
 
 
-flags=`echo $link | tr '[[:space:]],\n' ' '`
+flags=`echo $link | tr "'[[:space:]],\n" " "`
 
 # Strip trailing quotes
 old_flags="$flags"
diff --git a/f_check b/f_check
index 2dbe947..1499fa7 100755 (executable)
--- a/f_check
+++ b/f_check
@@ -84,7 +84,7 @@ else
                 ;;
             *GNU*|*GCC*)
 
-                v="${data##*GCC: *\) }"
+                v="${data#*GCC: *\) }"
                 v="${v%%\"*}"
 
                 major="${v%%.*}"
@@ -309,7 +309,7 @@ if [ -n "$link" ]; then
 
     link=`echo "$link" | sed 's/\-rpath-link[[:space:]]+/\-rpath-link\%/g'`
 
-    flags=`echo "$link" | tr ',\n' ' '`
+    flags=`echo "$link" | tr "',\n" " "`
     # remove leading and trailing quotes from each flag.
     #@flags = map {s/^['"]|['"]$//g; $_} @flags;