Skip to content

Commit 275acc7

Browse files
committed
Only check lib.f2c == LBT_F2C_PLAIN if we're F2C capable
1 parent f5b4551 commit 275acc7

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

test/direct.jl

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ lbt_handle = dlopen("$(lbt_prefix)/$(binlib)/lib$(lbt_link_name).$(shlib_ext)",
7373
@test libs[1].suffix == ""
7474
@test libs[1].interface == LBT_INTERFACE_LP64
7575
end
76-
@test libs[1].f2c == LBT_F2C_PLAIN
76+
if (config.build_flags & LBT_BUILDFLAGS_F2C_CAPABLE) != 0
77+
@test libs[1].f2c == LBT_F2C_PLAIN
78+
else
79+
@test libs[1].f2c == LBT_F2C_UNKNOWN
80+
end
7781
if Sys.ARCH (:x86_64, :aarch64)
7882
if Sys.iswindows()
7983
@test libs[1].complex_retstyle == LBT_COMPLEX_RETSTYLE_FNDA
@@ -96,7 +100,11 @@ lbt_handle = dlopen("$(lbt_prefix)/$(binlib)/lib$(lbt_link_name).$(shlib_ext)",
96100
@test libs[2].libname == OpenBLAS32_jll.libopenblas_path
97101
@test libs[2].suffix == ""
98102
@test libs[2].interface == LBT_INTERFACE_LP64
99-
@test libs[2].f2c == LBT_F2C_PLAIN
103+
if (config.build_flags & LBT_BUILDFLAGS_F2C_CAPABLE) != 0
104+
@test libs[2].f2c == LBT_F2C_PLAIN
105+
else
106+
@test libs[2].f2c == LBT_F2C_UNKNOWN
107+
end
100108

101109
# If OpenBLAS32 and OpenBLAS are the same interface (e.g. i686)
102110
# then libs[2].active_forwards should be all zero!
@@ -114,7 +122,11 @@ lbt_handle = dlopen("$(lbt_prefix)/$(binlib)/lib$(lbt_link_name).$(shlib_ext)",
114122
@test libs[1].libname == OpenBLAS32_jll.libopenblas_path
115123
@test libs[1].suffix == ""
116124
@test libs[1].interface == LBT_INTERFACE_LP64
117-
@test libs[1].f2c == LBT_F2C_PLAIN
125+
if (config.build_flags & LBT_BUILDFLAGS_F2C_CAPABLE) != 0
126+
@test libs[1].f2c == LBT_F2C_PLAIN
127+
else
128+
@test libs[1].f2c == LBT_F2C_UNKNOWN
129+
end
118130
end
119131

120132
@testset "get/set threads" begin

test/utils.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ end
145145
const LBT_INTERFACE_LP64 = 32
146146
const LBT_INTERFACE_ILP64 = 64
147147
const LBT_F2C_PLAIN = 0
148+
const LBT_F2C_UNKNOWN = -1
148149
const LBT_COMPLEX_RETSTYLE_NORMAL = 0
149150
const LBT_COMPLEX_RETSTYLE_ARGUMENT = 1
150151
const LBT_COMPLEX_RETSTYLE_FNDA = 2

0 commit comments

Comments
 (0)