Skip to content

Commit 947221c

Browse files
authored
Only define libssp if our CSL intsall actually has it (#58175)
Some CSL installs (such as those from `USE_BINARYBUILDER=0` builds) do not have a `libssp`, because their GCC was built without stack smash protection, or it was statically linked. This allows our CSL_jll to adapt to that, avoiding issues like those reported in [0]. [0]: #58173 This should fix #58173
2 parents cb10e40 + f2641f8 commit 947221c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ end
7272
const libgfortran = LazyLibrary(_libgfortran_path, dependencies=libgfortran_deps)
7373
const libstdcxx = LazyLibrary(_libstdcxx_path, dependencies=[libgcc_s])
7474
const libgomp = LazyLibrary(_libgomp_path)
75-
if @isdefined _libssp_path
75+
76+
# Some installations (such as those from-source) may not have `libssp`
77+
# So let's do a compile-time check to see if we've got it.
78+
if @isdefined(_libssp_path) && isfile(string(_libssp_path))
7679
const libssp = LazyLibrary(_libssp_path)
7780
end
7881

0 commit comments

Comments
 (0)