Replace vpermpd with vpermilpd
[platform/upstream/openblas.git] / f_check
diff --git a/f_check b/f_check
index b3e0311..b05db85 100644 (file)
--- a/f_check
+++ b/f_check
@@ -71,7 +71,7 @@ if ($compiler eq "") {
 
        if ($data =~ /GNU/) {
 
-           $data =~ /(\d)\.(\d).(.)/;
+           $data =~ /(\d)\.(\d).(\d)/;
            $major = $1;
            $minor = $2;
 
@@ -97,7 +97,7 @@ if ($compiler eq "") {
 
        if ($data =~ /Intel/) {
            $vendor = INTEL;
-           $openmp = "-openmp";
+           $openmp = "-fopenmp";
        }
 
         if ($data =~ /Sun Fortran/) {
@@ -125,9 +125,9 @@ if ($compiler eq "") {
            $openmp = "-openmp";
        }
 
-       # for embeded underscore name, e.g. zho_ge, it may append 2 underscores.
+       # for embedded underscore name, e.g. zho_ge, it may append 2 underscores.
        $data = `$compiler -O2 -S ftest3.f > /dev/null 2>&1 && cat ftest3.s && rm -f ftest3.s`;
-       if ($data =~ /zho_ge__/) {
+       if ($data =~ / zho_ge__/) {
            $need2bu       = 1;
        }
     }
@@ -155,7 +155,7 @@ if ($compiler eq "") {
        if ($compiler =~ /ifort/) {
            $vendor = INTEL;
            $bu       = "_";
-           $openmp = "-openmp";
+           $openmp = "-fopenmp";
        }
 
        if ($compiler =~ /pathf/) {
@@ -233,6 +233,10 @@ if (!$?) {
        if ($?) {
            $link = `$compiler $openmp -q32 -v ftest2.f 2>&1 && rm -f a.out a.exe`;
        }
+        # for AIX
+       if ($?) {
+           $link = `$compiler $openmp -maix32 -v ftest2.f 2>&1 && rm -f a.out a.exe`;
+       }
        #For gfortran MIPS
        if ($?) {
     $mips_data = `$compiler_bin -E -dM - < /dev/null`;
@@ -250,6 +254,10 @@ if (!$?) {
        if ($?) {
            $link = `$compiler $openmp -q64 -v ftest2.f 2>&1 && rm -f a.out a.exe`;
        }
+        # for AIX
+       if ($?) {
+           $link = `$compiler $openmp -maix64 -v ftest2.f 2>&1 && rm -f a.out a.exe`;
+       }
        #For gfortran MIPS
        if ($?) {
            $link = `$compiler $openmp -mabi=64 -v ftest2.f 2>&1 && rm -f a.out a.exe`;
@@ -284,9 +292,6 @@ if ($link ne "") {
            && ($flags !~ /^-LIST:/)
            && ($flags !~ /^-LANG:/)
            ) {
-           if ($vendor eq "PGI") {
-               $flags =~ s/lib$/libso/;
-           }
            $linker_L .= $flags . " ";
        }
 
@@ -303,17 +308,11 @@ if ($link ne "") {
 
        if ($flags =~ /^\-rpath\@/) {
            $flags =~ s/\@/\,/g;
-           if ($vendor eq "PGI") {
-               $flags =~ s/lib$/libso/;
-           }
            $linker_L .= "-Wl,". $flags . " " ;
        }
 
        if ($flags =~ /^\-rpath-link\@/) {
            $flags =~ s/\@/\,/g;
-           if ($vendor eq "PGI") {
-               $flags =~ s/lib$/libso/;
-           }
            $linker_L .= "-Wl,". $flags . " " ;
        }
 
@@ -322,7 +321,6 @@ if ($link ne "") {
            && ($flags !~ /gfortranbegin/)
            && ($flags !~ /frtbegin/)
            && ($flags !~ /pathfstart/)
-           && ($flags !~ /numa/)
            && ($flags !~ /crt[0-9]/)
            && ($flags !~ /gcc/)
            && ($flags !~ /user32/)