@@ -188,13 +188,13 @@ if (($architecture eq "mips") || ($architecture eq "mips64")) {
188188 if ($@ ){
189189 warn " could not load PERL module File::Temp, so could not check MSA capatibility" ;
190190 } else {
191- $tmpf = new File::Temp( UNLINK => 1 );
191+ $tmpf = new File::Temp( SUFFIX => ' .c ' , UNLINK => 1 );
192192 $code = ' "addvi.b $w0, $w1, 1"' ;
193193 $msa_flags = " -mmsa -mfp64 -msched-weight -mload-store-pairs" ;
194194 print $tmpf " #include <msa.h>\n\n " ;
195195 print $tmpf " void main(void){ __asm__ volatile($code ); }\n " ;
196196
197- $args = " $msa_flags -o $tmpf .o -x c $tmpf " ;
197+ $args = " $msa_flags -o $tmpf .o $tmpf " ;
198198 my @cmd = (" $compiler_name $args " );
199199 system (@cmd ) == 0;
200200 if ($? != 0) {
@@ -229,10 +229,13 @@ if (($architecture eq "x86") || ($architecture eq "x86_64")) {
229229 $no_avx512 = 0;
230230 } else {
231231# $tmpf = new File::Temp( UNLINK => 1 );
232- ($fh ,$tmpf ) = tempfile( UNLINK => 1 );
232+ ($fh ,$tmpf ) = tempfile( SUFFIX => ' .c ' , UNLINK => 1 );
233233 $code = ' "vbroadcastss -4 * 4(%rsi), %zmm2"' ;
234234 print $tmpf " #include <immintrin.h>\n\n int main(void){ __asm__ volatile($code ); }\n " ;
235- $args = " -march=skylake-avx512 -c -o $tmpf .o -x c $tmpf " ;
235+ $args = " -march=skylake-avx512 -c -o $tmpf .o $tmpf " ;
236+ if ($compiler eq " PGI" ) {
237+ $args = " -tp skylake -c -o $tmpf .o $tmpf " ;
238+ }
236239 my @cmd = (" $compiler_name $args >/dev/null 2>/dev/null" );
237240 system (@cmd ) == 0;
238241 if ($? != 0) {
@@ -318,6 +321,7 @@ $linker_a = "";
318321 && ($flags !~ / kernel32/ )
319322 && ($flags !~ / advapi32/ )
320323 && ($flags !~ / shell32/ )
324+ && ($flags !~ / omp/ )
321325 ) {
322326 $linker_l .= $flags . " "
323327 }
0 commit comments