114114
115115 # ALLAUX -- Auxiliary routines called from all precisions
116116 # already provided by @blasobjs: xerbla, lsame
117- ilaenv, ieeeck, lsamen, xerbla_array, iparmq,
118- ilaprec, ilatrans, ilauplo, iladiag, chla_transtype,
117+ ilaenv, ieeeck, lsamen, iparmq,
118+ ilaprec, ilatrans, ilauplo, iladiag,
119119 ilaver, slamch, slamc3,
120120
121121 # SCLAUX -- Auxiliary routines called from both REAL and COMPLEX.
26722672 # LAPACKE_zlagsy_work,
26732673 );
26742674
2675+ # These function may need 2 underscores.
2676+ @lapack_embeded_underscore_objs =(xerbla_array, chla_transtype,);
2677+
26752678if ($ARGV [5] == 1) {
26762679 # NO_LAPACK=1
26772680 @underscore_objs = (@blasobjs , @misc_underscore_objs );
26782681} elsif (-d " ../lapack-3.1.1" || -d " ../lapack-3.4.0" || -d " ../lapack-3.4.1" ||
26792682 -d " ../lapack-3.4.2" || -d " ../lapack-netlib" ) {
2680- @underscore_objs = (@blasobjs , @lapackobjs , @lapackobjs2 , @misc_underscore_objs );
2683+
2684+ if ($ARGV [7] == 0){
2685+ # NEED2UNDERSCORES=0
2686+ # Don't need 2 underscores
2687+ @underscore_objs = (@blasobjs , @lapackobjs , @lapackobjs2 , @misc_underscore_objs , @lapack_embeded_underscore_objs );
2688+ }else {
2689+ # Need 2 underscores
2690+ @underscore_objs = (@blasobjs , @lapackobjs , @lapackobjs2 , @misc_underscore_objs );
2691+ @need_2underscore_objs = (@lapack_embeded_underscore_objs );
2692+ };
2693+
26812694} else {
26822695 @underscore_objs = (@blasobjs , @lapackobjs , @misc_underscore_objs );
26832696}
@@ -2729,6 +2742,10 @@ if ($ARGV[0] eq "linux"){
27292742 print $objs , $bu , " \n " ;
27302743 }
27312744
2745+ foreach $objs (@need_2underscore_objs ) {
2746+ print $objs , $bu , $bu , " \n " ;
2747+ }
2748+
27322749# if ($ARGV[4] == 0) {
27332750 foreach $objs (@no_underscore_objs ) {
27342751 print $objs , " \n " ;
@@ -2750,6 +2767,10 @@ if ($ARGV[0] eq "osx"){
27502767 print " _" , $objs , $bu , " \n " ;
27512768 }
27522769
2770+ foreach $objs (@need_2underscore_objs ) {
2771+ print " _" , $objs , $bu , $bu , " \n " ;
2772+ }
2773+
27532774# if ($ARGV[4] == 0) {
27542775 foreach $objs (@no_underscore_objs ) {
27552776 print " _" , $objs , " \n " ;
@@ -2767,6 +2788,10 @@ if ($ARGV[0] eq "aix"){
27672788 print $objs , $bu , " \n " ;
27682789 }
27692790
2791+ foreach $objs (@need_2underscore_objs ) {
2792+ print $objs , $bu , $bu , " \n " ;
2793+ }
2794+
27702795# if ($ARGV[4] == 0) {
27712796 foreach $objs (@no_underscore_objs ) {
27722797 print $objs , " \n " ;
@@ -2791,6 +2816,17 @@ if ($ARGV[0] eq "win2k"){
27912816 print " \t $uppercase =$objs " , " _ \@ " , $count , " \n " ;
27922817 $count ++;
27932818 }
2819+
2820+ foreach $objs (@need_2underscore_objs ) {
2821+ $uppercase = $objs ;
2822+ $uppercase =~ tr / [a-z]/ [A-Z]/ ;
2823+ print " \t $objs =$objs " ," __ \@ " , $count , " \n " ;
2824+ $count ++;
2825+ print " \t " ,$objs , " __=$objs " ," __ \@ " , $count , " \n " ;
2826+ $count ++;
2827+ print " \t $uppercase =$objs " , " __ \@ " , $count , " \n " ;
2828+ $count ++;
2829+ }
27942830
27952831 # for misc_common_objs
27962832 foreach $objs (@misc_common_objs ) {
@@ -2852,6 +2888,18 @@ if ($ARGV[0] eq "microsoft"){
28522888 print " \t $uppercase \_ = $objs " ," _\n " ;
28532889 $count ++;
28542890 }
2891+
2892+ foreach $objs (@need_2underscore_objs ) {
2893+ $uppercase = $objs ;
2894+ $uppercase =~ tr / [a-z]/ [A-Z]/ ;
2895+ print " \t $objs =$objs " ," __ \@ " , $count , " \n " ;
2896+ $count ++;
2897+ print " \t " ,$objs , " __=$objs " ," __ \@ " , $count , " \n " ;
2898+ $count ++;
2899+ print " \t $uppercase =$objs " , " __ \@ " , $count , " \n " ;
2900+ $count ++;
2901+ }
2902+
28552903 exit (0);
28562904}
28572905
@@ -2868,6 +2916,16 @@ if ($ARGV[0] eq "win2kasm"){
28682916 print " _" , $uppercase , " _:\n " ;
28692917 print " \t jmp\t _" , $objs , " _\n " ;
28702918 }
2919+
2920+ foreach $objs (@need_2underscore_objs ) {
2921+ $uppercase = $objs ;
2922+ $uppercase =~ tr / [a-z]/ [A-Z]/ ;
2923+ print " \t .align 16\n " ;
2924+ print " \t .globl _" , $uppercase , " __\n " ;
2925+ print " _" , $uppercase , " __:\n " ;
2926+ print " \t jmp\t _" , $objs , " __\n " ;
2927+ }
2928+
28712929 exit (0);
28722930}
28732931
@@ -2880,6 +2938,11 @@ if ($ARGV[0] eq "linktest"){
28802938 foreach $objs (@underscore_objs ) {
28812939 print $objs , $bu , " ();\n " if $objs ne " xerbla" ;
28822940 }
2941+
2942+ foreach $objs (@need_2underscore_objs ) {
2943+ print $objs , $bu , $bu , " ();\n " ;
2944+ }
2945+
28832946# if ($ARGV[4] == 0) {
28842947 foreach $objs (@no_underscore_objs ) {
28852948 print $objs , " ();\n " ;
0 commit comments