Skip to content

Commit b4123cb

Browse files
committed
cblas: don't use link_xerbla hack if weak symbols are available
1 parent 789197e commit b4123cb

File tree

9 files changed

+17
-1
lines changed

9 files changed

+17
-1
lines changed

CBLAS/testing/c_c2chke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ void F77_c2chke(char *rout) {
3636
extern int RowMajorStrg;
3737
extern char *cblas_rout;
3838

39+
#ifndef HAS_ATTRIBUTE_WEAK_SUPPORT
3940
if (link_xerbla) /* call these first to link */
4041
{
4142
cblas_xerbla(cblas_info,cblas_rout,"");
4243
F77_xerbla(cblas_rout,&cblas_info);
4344
}
45+
#endif
4446

4547
cblas_ok = TRUE ;
4648
cblas_lerr = PASSED ;

CBLAS/testing/c_c3chke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ void F77_c3chke(char * rout) {
3939
cblas_ok = TRUE ;
4040
cblas_lerr = PASSED ;
4141

42+
#ifndef HAS_ATTRIBUTE_WEAK_SUPPORT
4243
if (link_xerbla) /* call these first to link */
4344
{
4445
cblas_xerbla(cblas_info,cblas_rout,"");
4546
F77_xerbla(cblas_rout,&cblas_info);
4647
}
48+
#endif
4749

4850
if (strncmp( sf,"cblas_cgemm" ,11)==0) {
4951
cblas_rout = "cblas_cgemm" ;

CBLAS/testing/c_d2chke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ void F77_d2chke(char *rout) {
3434
extern int RowMajorStrg;
3535
extern char *cblas_rout;
3636

37+
#ifndef HAS_ATTRIBUTE_WEAK_SUPPORT
3738
if (link_xerbla) /* call these first to link */
3839
{
3940
cblas_xerbla(cblas_info,cblas_rout,"");
4041
F77_xerbla(cblas_rout,&cblas_info);
4142
}
43+
#endif
4244

4345
cblas_ok = TRUE ;
4446
cblas_lerr = PASSED ;

CBLAS/testing/c_d3chke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ void F77_d3chke(char *rout) {
3434
extern int RowMajorStrg;
3535
extern char *cblas_rout;
3636

37+
#ifndef HAS_ATTRIBUTE_WEAK_SUPPORT
3738
if (link_xerbla) /* call these first to link */
3839
{
3940
cblas_xerbla(cblas_info,cblas_rout,"");
4041
F77_xerbla(cblas_rout,&cblas_info);
4142
}
43+
#endif
4244

4345
cblas_ok = TRUE ;
4446
cblas_lerr = PASSED ;

CBLAS/testing/c_s2chke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ void F77_s2chke(char *rout) {
3434
extern int RowMajorStrg;
3535
extern char *cblas_rout;
3636

37+
#ifndef HAS_ATTRIBUTE_WEAK_SUPPORT
3738
if (link_xerbla) /* call these first to link */
3839
{
3940
cblas_xerbla(cblas_info,cblas_rout,"");
4041
F77_xerbla(cblas_rout,&cblas_info);
4142
}
43+
#endif
4244

4345
cblas_ok = TRUE ;
4446
cblas_lerr = PASSED ;

CBLAS/testing/c_s3chke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ void F77_s3chke(char *rout) {
3434
extern int RowMajorStrg;
3535
extern char *cblas_rout;
3636

37+
#ifndef HAS_ATTRIBUTE_WEAK_SUPPORT
3738
if (link_xerbla) /* call these first to link */
3839
{
3940
cblas_xerbla(cblas_info,cblas_rout,"");
4041
F77_xerbla(cblas_rout,&cblas_info);
4142
}
43+
#endif
4244

4345
cblas_ok = TRUE ;
4446
cblas_lerr = PASSED ;

CBLAS/testing/c_xerbla.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void cblas_xerbla(CBLAS_INDEX info, const char *rout, const char *form, ...)
1212
extern int RowMajorStrg;
1313
extern char *cblas_rout;
1414

15-
/* Initially, c__3chke will call this routine with
15+
/* Initially, c__3chke may call this routine with
1616
* global variable link_xerbla=1, and F77_xerbla will set link_xerbla=0.
1717
* This is done to fool the linker into loading these subroutines first
1818
* instead of ones in the CBLAS or the legacy BLAS library.

CBLAS/testing/c_z2chke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ void F77_z2chke(char *rout) {
3636
extern int RowMajorStrg;
3737
extern char *cblas_rout;
3838

39+
#ifndef HAS_ATTRIBUTE_WEAK_SUPPORT
3940
if (link_xerbla) /* call these first to link */
4041
{
4142
cblas_xerbla(cblas_info,cblas_rout,"");
4243
F77_xerbla(cblas_rout,&cblas_info);
4344
}
45+
#endif
4446

4547
cblas_ok = TRUE ;
4648
cblas_lerr = PASSED ;

CBLAS/testing/c_z3chke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ void F77_z3chke(char * rout) {
3939
cblas_ok = TRUE ;
4040
cblas_lerr = PASSED ;
4141

42+
#ifndef HAS_ATTRIBUTE_WEAK_SUPPORT
4243
if (link_xerbla) /* call these first to link */
4344
{
4445
cblas_xerbla(cblas_info,cblas_rout,"");
4546
F77_xerbla(cblas_rout,&cblas_info);
4647
}
48+
#endif
4749

4850
if (strncmp( sf,"cblas_zgemm" ,11)==0) {
4951
cblas_rout = "cblas_zgemm" ;

0 commit comments

Comments
 (0)