• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #38031

18 Mar 2025 05:23AM UTC coverage: 22.851% (+2.7%) from 20.133%
#38031

push

local

web-flow
CSL_jll: Fix `libatomic` path for FreeBSD (#57811)

This is required to avoid introducing a name / binding in the Module
without a corresponding definition.

Resolves #57808

11163 of 48852 relevant lines covered (22.85%)

147569.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.85
/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl
1
# This file is a part of Julia. License is MIT: https://julialang.org/license
2

3
## dummy stub for https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl
4

5
baremodule CompilerSupportLibraries_jll
6
using Base, Libdl, Base.BinaryPlatforms
7

8
export libgfortran, libstdcxx, libgomp, libatomic, libgcc_s
9

10
# These get calculated in __init__()
11
const LIBPATH = Ref("")
12
const LIBPATH_list = String[]
13
artifact_dir::String = ""
14
libgcc_s_path::String = ""
15
libgfortran_path::String = ""
16
libstdcxx_path::String = ""
17
libgomp_path::String = ""
18

19
if Sys.iswindows()
20
    const _libatomic_path = BundledLazyLibraryPath("libatomic-1.dll")
21
    const _libquadmath_path = BundledLazyLibraryPath("libquadmath-0.dll")
22
    if arch(HostPlatform()) == "x86_64"
23
        const _libgcc_s_path = BundledLazyLibraryPath("libgcc_s_seh-1.dll")
24
    else
25
        const _libgcc_s_path = BundledLazyLibraryPath("libgcc_s_sjlj-1.dll")
26
    end
27
    const _libgfortran_path = BundledLazyLibraryPath(string("libgfortran-", libgfortran_version(HostPlatform()).major, ".dll"))
28
    const _libstdcxx_path = BundledLazyLibraryPath("libstdc++-6.dll")
29
    const _libgomp_path = BundledLazyLibraryPath("libgomp-1.dll")
30
    const _libssp_path = BundledLazyLibraryPath("libssp-0.dll")
31
elseif Sys.isapple()
32
    const _libatomic_path = BundledLazyLibraryPath("libatomic.1.dylib")
33
    const _libquadmath_path = BundledLazyLibraryPath("libquadmath.0.dylib")
34
    if arch(HostPlatform()) == "aarch64" || libgfortran_version(HostPlatform()) == v"5"
35
        const _libgcc_s_path = BundledLazyLibraryPath("libgcc_s.1.1.dylib")
36
    else
37
        const _libgcc_s_path = BundledLazyLibraryPath("libgcc_s.1.dylib")
38
    end
39
    const _libgfortran_path = BundledLazyLibraryPath(string("libgfortran.", libgfortran_version(HostPlatform()).major, ".dylib"))
40
    const _libstdcxx_path = BundledLazyLibraryPath("libstdc++.6.dylib")
41
    const _libgomp_path = BundledLazyLibraryPath("libgomp.1.dylib")
42
    const _libssp_path = BundledLazyLibraryPath("libssp.0.dylib")
43
else
44
    if Sys.isfreebsd()
45
        const _libatomic_path = BundledLazyLibraryPath("libatomic.so.3")
46
    else
47
        const _libatomic_path = BundledLazyLibraryPath("libatomic.so.1")
48
    end
49
    const _libgcc_s_path = BundledLazyLibraryPath("libgcc_s.so.1")
50
    const _libgfortran_path = BundledLazyLibraryPath(string("libgfortran.so.", libgfortran_version(HostPlatform()).major))
51
    const _libstdcxx_path = BundledLazyLibraryPath("libstdc++.so.6")
52
    const _libgomp_path = BundledLazyLibraryPath("libgomp.so.1")
53
    if libc(HostPlatform()) != "musl"
54
        const _libssp_path = BundledLazyLibraryPath("libssp.so.0")
55
    end
56
    if arch(HostPlatform()) ∈ ("x86_64", "i686")
57
        const _libquadmath_path = BundledLazyLibraryPath("libquadmath.so.0")
58
    end
59
end
60

61
if @isdefined(_libatomic_path)
62
    const libatomic = LazyLibrary(_libatomic_path)
63
end
64
const libgcc_s = LazyLibrary(_libgcc_s_path)
65
libgfortran_deps = [libgcc_s]
66
if @isdefined _libquadmath_path
67
    const libquadmath = LazyLibrary(_libquadmath_path)
68
    push!(libgfortran_deps, libquadmath)
69
end
70
const libgfortran = LazyLibrary(_libgfortran_path, dependencies=libgfortran_deps)
71
const libstdcxx = LazyLibrary(_libstdcxx_path, dependencies=[libgcc_s])
72
const libgomp = LazyLibrary(_libgomp_path)
73
if @isdefined _libssp_path
74
    const libssp = LazyLibrary(_libssp_path)
75
end
76

77
# Conform to LazyJLLWrappers API
78
function eager_mode()
×
79
    if @isdefined(libatomic)
×
80
        dlopen(libatomic)
×
81
    end
82
    dlopen(libgcc_s)
×
83
    dlopen(libgomp)
×
84
    if @isdefined libquadmath
×
85
        dlopen(libquadmath)
×
86
    end
87
    if @isdefined libssp
×
88
        dlopen(libssp)
×
89
    end
90
    dlopen(libgfortran)
×
91
    dlopen(libstdcxx)
×
92
end
93
is_available() = true
×
94

95
function __init__()
3✔
96
    if @isdefined _libatomic_path
3✔
97
        global libatomic_path = string(_libatomic_path)
6✔
98
    end
99
    global libgcc_s_path = string(_libgcc_s_path)
6✔
100
    global libgomp_path = string(_libgomp_path)
6✔
101
    if @isdefined _libquadmath_path
3✔
102
        global libquadmath_path = string(_libquadmath_path)
6✔
103
    end
104
    if @isdefined _libssp_path
3✔
105
        global libssp_path = string(_libssp_path)
6✔
106
    end
107
    global libgfortran_path = string(_libgfortran_path)
6✔
108
    global libstdcxx_path = string(_libstdcxx_path)
6✔
109
    global artifact_dir = dirname(Sys.BINDIR)
3✔
110
    LIBPATH[] = dirname(libgcc_s_path)
3✔
111
    push!(LIBPATH_list, LIBPATH[])
3✔
112
end
113

114
end  # module CompilerSupportLibraries_jll
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc