Skip to content

Commit 0efc765

Browse files
authored
Merge pull request #48011 from JuliaLang/backports-release-1.8
Backports for Julia 1.8.5
2 parents 00177eb + cb73296 commit 0efc765

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

base/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ else
218218
$(eval $(call symlink_system_library,CSL,libgcc_s,1))
219219
endif
220220
endif
221+
else
222+
$(eval $(call symlink_system_library,CSL,libgcc_s,1))
221223
endif
222224
ifneq (,$(LIBGFORTRAN_VERSION))
223225
$(eval $(call symlink_system_library,CSL,libgfortran,$(LIBGFORTRAN_VERSION)))

src/aotcompile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ static void injectCRTAlias(Module &M, StringRef name, StringRef alias, FunctionT
442442
if (!target) {
443443
target = Function::Create(FT, Function::ExternalLinkage, alias, M);
444444
}
445-
Function *interposer = Function::Create(FT, Function::WeakAnyLinkage, name, M);
445+
Function *interposer = Function::Create(FT, Function::InternalLinkage, name, M);
446446
appendToCompilerUsed(M, {interposer});
447447

448448
llvm::IRBuilder<> builder(BasicBlock::Create(M.getContext(), "top", interposer));

stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ libstdcxx_handle = C_NULL
2121
libstdcxx_path = ""
2222
libgomp_handle = C_NULL
2323
libgomp_path = ""
24+
libssp_handle = C_NULL
25+
libssp_path = ""
2426

2527
if Sys.iswindows()
2628
if arch(HostPlatform()) == "x86_64"
@@ -31,6 +33,7 @@ if Sys.iswindows()
3133
const libgfortran = string("libgfortran-", libgfortran_version(HostPlatform()).major, ".dll")
3234
const libstdcxx = "libstdc++-6.dll"
3335
const libgomp = "libgomp-1.dll"
36+
const libssp = "libssp-0.dll"
3437
elseif Sys.isapple()
3538
if arch(HostPlatform()) == "aarch64" || libgfortran_version(HostPlatform()) == v"5"
3639
const libgcc_s = "@rpath/libgcc_s.1.1.dylib"
@@ -40,11 +43,15 @@ elseif Sys.isapple()
4043
const libgfortran = string("@rpath/", "libgfortran.", libgfortran_version(HostPlatform()).major, ".dylib")
4144
const libstdcxx = "@rpath/libstdc++.6.dylib"
4245
const libgomp = "@rpath/libgomp.1.dylib"
46+
const libssp = "@rpath/libssp.0.dylib"
4347
else
4448
const libgcc_s = "libgcc_s.so.1"
4549
const libgfortran = string("libgfortran.so.", libgfortran_version(HostPlatform()).major)
4650
const libstdcxx = "libstdc++.so.6"
4751
const libgomp = "libgomp.so.1"
52+
if libc(HostPlatform()) != "musl"
53+
const libssp = "libssp.so.0"
54+
end
4855
end
4956

5057
function __init__()
@@ -56,6 +63,10 @@ function __init__()
5663
global libstdcxx_path = dlpath(libstdcxx_handle)
5764
global libgomp_handle = dlopen(libgomp)
5865
global libgomp_path = dlpath(libgomp_handle)
66+
@static if libc(HostPlatform()) != "musl"
67+
global libssp_handle = dlopen(libssp)
68+
global libssp_path = dlpath(libssp_handle)
69+
end
5970
global artifact_dir = dirname(Sys.BINDIR)
6071
LIBPATH[] = dirname(libgcc_s_path)
6172
push!(LIBPATH_list, LIBPATH[])
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# This file is a part of Julia. License is MIT: https://julialang.org/license
22

3-
using Test, CompilerSupportLibraries_jll
3+
using Test, CompilerSupportLibraries_jll, Base.BinaryPlatforms
44

55
@testset "CompilerSupportLibraries_jll" begin
66
@test isfile(CompilerSupportLibraries_jll.libgcc_s_path)
77
@test isfile(CompilerSupportLibraries_jll.libgfortran_path)
88
@test isfile(CompilerSupportLibraries_jll.libstdcxx_path)
99
@test isfile(CompilerSupportLibraries_jll.libgomp_path)
10+
if libc(HostPlatform()) != "musl"
11+
@test isfile(CompilerSupportLibraries_jll.libssp_path)
12+
end
1013
end

stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function __init__()
4747
!haskey(ENV, "OMP_NUM_THREADS")
4848
# We set this to `1` here, and then LinearAlgebra will update
4949
# to the true value in its `__init__()` function.
50-
ENV["OPENBLAS_NUM_THREADS"] = "1"
50+
ENV["OPENBLAS_DEFAULT_NUM_THREADS"] = "1"
5151
end
5252

5353
global libopenblas_handle = dlopen(libopenblas)

0 commit comments

Comments
 (0)