Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[CompilerSupportLibraries_jll] Add libssp for more platforms (#48027)" #48200

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,11 @@ elseif Sys.isapple()
const libgfortran = string("@rpath/", "libgfortran.", libgfortran_version(HostPlatform()).major, ".dylib")
const libstdcxx = "@rpath/libstdc++.6.dylib"
const libgomp = "@rpath/libgomp.1.dylib"
const libssp = "@rpath/libssp.0.dylib"
else
const libgcc_s = "libgcc_s.so.1"
const libgfortran = string("libgfortran.so.", libgfortran_version(HostPlatform()).major)
const libstdcxx = "libstdc++.so.6"
const libgomp = "libgomp.so.1"
if libc(HostPlatform()) != "musl"
const libssp = "libssp.so.0"
end
end

function __init__()
Expand All @@ -63,7 +59,7 @@ function __init__()
global libstdcxx_path = dlpath(libstdcxx_handle)
global libgomp_handle = dlopen(libgomp)
global libgomp_path = dlpath(libgomp_handle)
@static if libc(HostPlatform()) != "musl"
if Sys.iswindows()
global libssp_handle = dlopen(libssp)
Copy link
Contributor

@t-bltg t-bltg Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, one could maybe use something like:

@static if libc(HostPlatform()) != "musl"
    global libssp_handle = dlopen(libssp; throw_error = false)
    global libssp_path = libssp_handle === nothing ? nothing : dlpath(libssp_handle)
end

in __init__, making the absence of libssp non-fatal.

EDIT: implemented in #48333.

global libssp_path = dlpath(libssp_handle)
end
Expand Down
4 changes: 2 additions & 2 deletions stdlib/CompilerSupportLibraries_jll/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test, CompilerSupportLibraries_jll, Base.BinaryPlatforms
using Test, CompilerSupportLibraries_jll

@testset "CompilerSupportLibraries_jll" begin
@test isfile(CompilerSupportLibraries_jll.libgcc_s_path)
@test isfile(CompilerSupportLibraries_jll.libgfortran_path)
@test isfile(CompilerSupportLibraries_jll.libstdcxx_path)
@test isfile(CompilerSupportLibraries_jll.libgomp_path)
if libc(HostPlatform()) != "musl"
if Sys.iswindows()
@test isfile(CompilerSupportLibraries_jll.libssp_path)
end
end