|
1 | 1 | # Autogenerated wrapper script for CompilerSupportLibraries_jll for aarch64-linux-gnu-libgfortran3 |
2 | 2 | export libgcc_s, libgfortran, libgomp, libstdcxx |
3 | 3 |
|
4 | | -## Global variables |
5 | | -PATH = "" |
6 | | -LIBPATH = "" |
7 | | -LIBPATH_env = "LD_LIBRARY_PATH" |
8 | | - |
9 | | -# Relative path to `libgcc_s` |
10 | | -const libgcc_s_splitpath = ["lib", "libgcc_s.so.1"] |
11 | | - |
12 | | -# This will be filled out by __init__() for all products, as it must be done at runtime |
13 | | -libgcc_s_path = "" |
14 | | - |
15 | | -# libgcc_s-specific global declaration |
16 | | -# This will be filled out by __init__() |
17 | | -libgcc_s_handle = C_NULL |
18 | | - |
19 | | -# This must be `const` so that we can use it with `ccall()` |
20 | | -const libgcc_s = "libgcc_s.so.1" |
21 | | - |
22 | | - |
23 | | -# Relative path to `libgfortran` |
24 | | -const libgfortran_splitpath = ["lib", "libgfortran.so.3"] |
25 | | - |
26 | | -# This will be filled out by __init__() for all products, as it must be done at runtime |
27 | | -libgfortran_path = "" |
28 | | - |
29 | | -# libgfortran-specific global declaration |
30 | | -# This will be filled out by __init__() |
31 | | -libgfortran_handle = C_NULL |
32 | | - |
33 | | -# This must be `const` so that we can use it with `ccall()` |
34 | | -const libgfortran = "libgfortran.so.3" |
35 | | - |
36 | | - |
37 | | -# Relative path to `libgomp` |
38 | | -const libgomp_splitpath = ["lib", "libgomp.so.1"] |
39 | | - |
40 | | -# This will be filled out by __init__() for all products, as it must be done at runtime |
41 | | -libgomp_path = "" |
42 | | - |
43 | | -# libgomp-specific global declaration |
44 | | -# This will be filled out by __init__() |
45 | | -libgomp_handle = C_NULL |
46 | | - |
47 | | -# This must be `const` so that we can use it with `ccall()` |
48 | | -const libgomp = "libgomp.so.1" |
49 | | - |
50 | | - |
51 | | -# Relative path to `libstdcxx` |
52 | | -const libstdcxx_splitpath = ["lib", "libstdc++.so.6"] |
53 | | - |
54 | | -# This will be filled out by __init__() for all products, as it must be done at runtime |
55 | | -libstdcxx_path = "" |
56 | | - |
57 | | -# libstdcxx-specific global declaration |
58 | | -# This will be filled out by __init__() |
59 | | -libstdcxx_handle = C_NULL |
60 | | - |
61 | | -# This must be `const` so that we can use it with `ccall()` |
62 | | -const libstdcxx = "libstdc++.so.6" |
63 | | - |
64 | | - |
65 | | -""" |
66 | | -Open all libraries |
67 | | -""" |
| 4 | +JLLWrappers.@generate_wrapper_header("CompilerSupportLibraries") |
| 5 | +JLLWrappers.@declare_library_product(libgcc_s, "libgcc_s.so.1") |
| 6 | +JLLWrappers.@declare_library_product(libgfortran, "libgfortran.so.3") |
| 7 | +JLLWrappers.@declare_library_product(libgomp, "libgomp.so.1") |
| 8 | +JLLWrappers.@declare_library_product(libstdcxx, "libstdc++.so.6") |
68 | 9 | function __init__() |
69 | | - global artifact_dir = abspath(artifact"CompilerSupportLibraries") |
70 | | - |
71 | | - # Initialize PATH and LIBPATH environment variable listings |
72 | | - global PATH_list, LIBPATH_list |
73 | | - # We first need to add to LIBPATH_list the libraries provided by Julia |
74 | | - append!(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)]) |
75 | | - global libgcc_s_path = normpath(joinpath(artifact_dir, libgcc_s_splitpath...)) |
76 | | - |
77 | | - # Manually `dlopen()` this right now so that future invocations |
78 | | - # of `ccall` with its `SONAME` will find this path immediately. |
79 | | - global libgcc_s_handle = dlopen(libgcc_s_path) |
80 | | - push!(LIBPATH_list, dirname(libgcc_s_path)) |
81 | | - |
82 | | - global libgfortran_path = normpath(joinpath(artifact_dir, libgfortran_splitpath...)) |
83 | | - |
84 | | - # Manually `dlopen()` this right now so that future invocations |
85 | | - # of `ccall` with its `SONAME` will find this path immediately. |
86 | | - global libgfortran_handle = dlopen(libgfortran_path) |
87 | | - push!(LIBPATH_list, dirname(libgfortran_path)) |
88 | | - |
89 | | - global libgomp_path = normpath(joinpath(artifact_dir, libgomp_splitpath...)) |
90 | | - |
91 | | - # Manually `dlopen()` this right now so that future invocations |
92 | | - # of `ccall` with its `SONAME` will find this path immediately. |
93 | | - global libgomp_handle = dlopen(libgomp_path) |
94 | | - push!(LIBPATH_list, dirname(libgomp_path)) |
95 | | - |
96 | | - global libstdcxx_path = normpath(joinpath(artifact_dir, libstdcxx_splitpath...)) |
97 | | - |
98 | | - # Manually `dlopen()` this right now so that future invocations |
99 | | - # of `ccall` with its `SONAME` will find this path immediately. |
100 | | - global libstdcxx_handle = dlopen(libstdcxx_path) |
101 | | - push!(LIBPATH_list, dirname(libstdcxx_path)) |
102 | | - |
103 | | - # Filter out duplicate and empty entries in our PATH and LIBPATH entries |
104 | | - filter!(!isempty, unique!(PATH_list)) |
105 | | - filter!(!isempty, unique!(LIBPATH_list)) |
106 | | - global PATH = join(PATH_list, ':') |
107 | | - global LIBPATH = join(LIBPATH_list, ':') |
108 | | - |
109 | | - # Add each element of LIBPATH to our DL_LOAD_PATH (necessary on platforms |
110 | | - # that don't honor our "already opened" trick) |
111 | | - #for lp in LIBPATH_list |
112 | | - # push!(DL_LOAD_PATH, lp) |
113 | | - #end |
| 10 | + JLLWrappers.@generate_init_header() |
| 11 | + JLLWrappers.@init_library_product( |
| 12 | + libgcc_s, |
| 13 | + "lib/libgcc_s.so.1", |
| 14 | + RTLD_LAZY | RTLD_DEEPBIND, |
| 15 | + ) |
| 16 | + |
| 17 | + JLLWrappers.@init_library_product( |
| 18 | + libgfortran, |
| 19 | + "lib/libgfortran.so.3", |
| 20 | + RTLD_LAZY | RTLD_DEEPBIND, |
| 21 | + ) |
| 22 | + |
| 23 | + JLLWrappers.@init_library_product( |
| 24 | + libgomp, |
| 25 | + "lib/libgomp.so.1", |
| 26 | + RTLD_LAZY | RTLD_DEEPBIND, |
| 27 | + ) |
| 28 | + |
| 29 | + JLLWrappers.@init_library_product( |
| 30 | + libstdcxx, |
| 31 | + "lib/libstdc++.so.6", |
| 32 | + RTLD_LAZY | RTLD_DEEPBIND, |
| 33 | + ) |
| 34 | + |
| 35 | + JLLWrappers.@generate_init_footer() |
114 | 36 | end # __init__() |
115 | | - |
0 commit comments