View | Details | Raw Unified | Return to bug 277697 | Differences between
and this patch

Collapse All | Expand All

(-)b/lang/julia/Makefile (-2 / +6 lines)
Lines 1-6 Link Here
1
PORTNAME=	julia
1
PORTNAME=	julia
2
DISTVERSION=	1.9.4
2
DISTVERSION=	1.9.4
3
PORTREVISION=	2
3
PORTREVISION=	3
4
DISTVERSIONSUFFIX=	-full
4
DISTVERSIONSUFFIX=	-full
5
CATEGORIES=	lang math
5
CATEGORIES=	lang math
6
MASTER_SITES=	https://github.com/JuliaLang/${PORTNAME}/releases/download/v${DISTVERSION}/
6
MASTER_SITES=	https://github.com/JuliaLang/${PORTNAME}/releases/download/v${DISTVERSION}/
Lines 39-49 BUILD_DEPENDS_amd64= ittapi>0:devel/ittapi Link Here
39
BUILD_DEPENDS_i386=	ittapi>0:devel/ittapi
39
BUILD_DEPENDS_i386=	ittapi>0:devel/ittapi
40
40
41
# Do not set USES=fortran to avoid extra-linkage
41
# Do not set USES=fortran to avoid extra-linkage
42
USES=		gmake cpe python perl5 blaslapack:openblas
42
USES=		blaslapack:openblas cpe elfctl gmake perl5 python
43
_GCC_VER=	${GCC_DEFAULT:S/.//}
43
_GCC_VER=	${GCC_DEFAULT:S/.//}
44
44
45
CPE_VENDOR=	julialang
45
CPE_VENDOR=	julialang
46
46
47
ELF_FEATURES=	+wxneeded:usr/bin/julia
48
47
USE_CXXSTD=	c++14
49
USE_CXXSTD=	c++14
48
USE_LDCONFIG=	yes
50
USE_LDCONFIG=	yes
49
51
Lines 120-125 pre-configure: Link Here
120
	) || ( \
122
	) || ( \
121
		echo "USE_BLAS64=0" >> ${WRKSRC}/Make.user \
123
		echo "USE_BLAS64=0" >> ${WRKSRC}/Make.user \
122
	)
124
	)
125
	echo 'LLVM_PATCH_VERSIONFIXES= $(FILESDIR)/llvm-patch-backport-version-fixes' \
126
		>> ${WRKSRC}/Make.user
123
127
124
pre-install:
128
pre-install:
125
	${CP} ${WRKSRC}/deps/srccache/cacert-2022-10-11.pem ${WRKSRC}/usr/share/julia/cert.pem
129
	${CP} ${WRKSRC}/deps/srccache/cacert-2022-10-11.pem ${WRKSRC}/usr/share/julia/cert.pem
(-)b/lang/julia/files/llvm-patch-backport-version-fixes (+375 lines)
Added Link Here
1
diff --git llvm/tools/lto/CMakeLists.txt llvm/tools/lto/CMakeLists.txt
2
index 67f6d3af40e0..9382ee9588b3 100644
3
--- llvm/tools/lto/CMakeLists.txt
4
+++ llvm/tools/lto/CMakeLists.txt
5
@@ -19,7 +19,11 @@ set(SOURCES
6
   lto.cpp
7
   )
8
 
9
-set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports)
10
+if (LLVM_LINK_LLVM_DYLIB)
11
+  set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.dylib.exports)
12
+else()
13
+  set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports)
14
+endif()
15
 
16
 if(CMAKE_SYSTEM_NAME STREQUAL AIX)
17
     set(LTO_LIBRARY_TYPE MODULE)
18
diff --git llvm/tools/lto/lto.dylib.exports llvm/tools/lto/lto.dylib.exports
19
new file mode 100644
20
index 000000000000..4164c3919a97
21
--- /dev/null
22
+++ llvm/tools/lto/lto.dylib.exports
23
@@ -0,0 +1,77 @@
24
+lto_get_error_message
25
+lto_get_version
26
+lto_initialize_disassembler
27
+lto_module_create
28
+lto_module_create_from_fd
29
+lto_module_create_from_fd_at_offset
30
+lto_module_create_from_memory
31
+lto_module_create_from_memory_with_path
32
+lto_module_create_in_local_context
33
+lto_module_create_in_codegen_context
34
+lto_module_has_ctor_dtor
35
+lto_module_get_linkeropts
36
+lto_module_get_macho_cputype
37
+lto_module_get_num_symbols
38
+lto_module_get_symbol_attribute
39
+lto_module_get_symbol_name
40
+lto_module_get_target_triple
41
+lto_module_set_target_triple
42
+lto_module_is_object_file
43
+lto_module_is_object_file_for_target
44
+lto_module_is_object_file_in_memory
45
+lto_module_is_object_file_in_memory_for_target
46
+lto_module_has_objc_category
47
+lto_module_dispose
48
+lto_api_version
49
+lto_codegen_set_diagnostic_handler
50
+lto_codegen_add_module
51
+lto_codegen_set_module
52
+lto_codegen_add_must_preserve_symbol
53
+lto_codegen_compile
54
+lto_codegen_create
55
+lto_codegen_create_in_local_context
56
+lto_codegen_dispose
57
+lto_codegen_set_debug_model
58
+lto_codegen_set_pic_model
59
+lto_codegen_write_merged_modules
60
+lto_codegen_debug_options
61
+lto_codegen_debug_options_array
62
+lto_codegen_set_assembler_args
63
+lto_codegen_set_assembler_path
64
+lto_codegen_set_cpu
65
+lto_codegen_compile_to_file
66
+lto_codegen_optimize
67
+lto_codegen_compile_optimized
68
+lto_codegen_set_should_internalize
69
+lto_codegen_set_should_embed_uselists
70
+lto_set_debug_options
71
+thinlto_create_codegen
72
+thinlto_codegen_dispose
73
+thinlto_codegen_add_module
74
+thinlto_codegen_process
75
+thinlto_module_get_num_objects
76
+thinlto_module_get_object
77
+thinlto_codegen_set_pic_model
78
+thinlto_codegen_set_cache_dir
79
+thinlto_codegen_set_cache_pruning_interval
80
+thinlto_codegen_set_cache_entry_expiration
81
+thinlto_codegen_set_final_cache_size_relative_to_available_space
82
+thinlto_codegen_set_cache_size_bytes
83
+thinlto_codegen_set_cache_size_megabytes
84
+thinlto_codegen_set_cache_size_files
85
+thinlto_codegen_set_savetemps_dir
86
+thinlto_codegen_set_cpu
87
+thinlto_debug_options
88
+lto_module_is_thinlto
89
+thinlto_codegen_add_must_preserve_symbol
90
+thinlto_codegen_add_cross_referenced_symbol
91
+thinlto_codegen_set_codegen_only
92
+thinlto_codegen_disable_codegen
93
+thinlto_module_get_num_object_files
94
+thinlto_module_get_object_file
95
+thinlto_set_generated_objects_dir
96
+lto_input_create
97
+lto_input_dispose
98
+lto_input_get_num_dependent_libraries
99
+lto_input_get_dependent_library
100
+lto_runtime_lib_symbols_list
101
diff --git llvm/tools/lto/lto.exports llvm/tools/lto/lto.exports
102
index 3abae5f0fcba..4164c3919a97 100644
103
--- llvm/tools/lto/lto.exports
104
+++ llvm/tools/lto/lto.exports
105
@@ -45,12 +45,6 @@ lto_codegen_compile_optimized
106
 lto_codegen_set_should_internalize
107
 lto_codegen_set_should_embed_uselists
108
 lto_set_debug_options
109
-LLVMCreateDisasm
110
-LLVMCreateDisasmCPU
111
-LLVMDisasmDispose
112
-LLVMDisasmInstruction
113
-LLVMSetDisasmOptions
114
-LLVMCreateDisasmCPUFeatures
115
 thinlto_create_codegen
116
 thinlto_codegen_dispose
117
 thinlto_codegen_add_module
118
diff --git llvm/tools/remarks-shlib/CMakeLists.txt llvm/tools/remarks-shlib/CMakeLists.txt
119
index f22cedd9ead7..2f108a42c9aa 100644
120
--- llvm/tools/remarks-shlib/CMakeLists.txt
121
+++ llvm/tools/remarks-shlib/CMakeLists.txt
122
@@ -9,7 +9,11 @@ if(LLVM_ENABLE_PIC)
123
     libremarks.cpp
124
     )
125
 
126
-  set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports)
127
+  if (LLVM_LINK_LLVM_DYLIB)
128
+    set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.dylib.exports)
129
+  else()
130
+    set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports)
131
+  endif()
132
 
133
   add_llvm_library(Remarks SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES})
134
 
135
diff --git llvm/tools/remarks-shlib/Remarks.dylib.exports llvm/tools/remarks-shlib/Remarks.dylib.exports
136
new file mode 100644
137
index 000000000000..0c2a3c38c78c
138
--- /dev/null
139
+++ llvm/tools/remarks-shlib/Remarks.dylib.exports
140
@@ -0,0 +1 @@
141
+LLVMRemarkVersion
142
diff --git openmp/libomptarget/plugins/exports openmp/libomptarget/plugins/exports
143
index 8664a2e493ee..cc7beda183af 100644
144
--- openmp/libomptarget/plugins/exports
145
+++ openmp/libomptarget/plugins/exports
146
@@ -1,36 +1,6 @@
147
 VERS1.0 {
148
   global:
149
-    __tgt_rtl_is_valid_binary;
150
-    __tgt_rtl_is_data_exchangable;
151
-    __tgt_rtl_number_of_devices;
152
-    __tgt_rtl_init_requires;
153
-    __tgt_rtl_init_device;
154
-    __tgt_rtl_load_binary;
155
-    __tgt_rtl_data_alloc;
156
-    __tgt_rtl_data_submit;
157
-    __tgt_rtl_data_submit_async;
158
-    __tgt_rtl_data_retrieve;
159
-    __tgt_rtl_data_retrieve_async;
160
-    __tgt_rtl_data_exchange;
161
-    __tgt_rtl_data_exchange_async;
162
-    __tgt_rtl_data_delete;
163
-    __tgt_rtl_run_target_team_region;
164
-    __tgt_rtl_run_target_team_region_async;
165
-    __tgt_rtl_run_target_region;
166
-    __tgt_rtl_run_target_region_async;
167
-    __tgt_rtl_synchronize;
168
-    __tgt_rtl_register_lib;
169
-    __tgt_rtl_unregister_lib;
170
-    __tgt_rtl_supports_empty_images;
171
-    __tgt_rtl_set_info_flag;
172
-    __tgt_rtl_print_device_info;
173
-    __tgt_rtl_create_event;
174
-    __tgt_rtl_record_event;
175
-    __tgt_rtl_wait_event;
176
-    __tgt_rtl_sync_event;
177
-    __tgt_rtl_destroy_event;
178
-    __tgt_rtl_init_device_info;
179
-    __tgt_rtl_init_async_info;
180
+    __tgt_rtl*;
181
   local:
182
     *;
183
 };
184
diff --git openmp/libomptarget/src/exports openmp/libomptarget/src/exports
185
index 0ef4c8cce521..425a6fad49cf 100644
186
--- openmp/libomptarget/src/exports
187
+++ openmp/libomptarget/src/exports
188
@@ -48,7 +48,6 @@ VERS1.0 {
189
     omp_get_interop_int;
190
     omp_get_interop_name;
191
     omp_get_interop_type_desc;
192
-    omp_get_interop_rc_desc;
193
     __tgt_interop_init;
194
     __tgt_interop_use;
195
     __tgt_interop_destroy;
196
diff --git openmp/runtime/cmake/LibompHandleFlags.cmake openmp/runtime/cmake/LibompHandleFlags.cmake
197
index 9e19e59ba17d..1ddbc870e0f1 100644
198
--- openmp/runtime/cmake/LibompHandleFlags.cmake
199
+++ openmp/runtime/cmake/LibompHandleFlags.cmake
200
@@ -98,7 +98,6 @@ function(libomp_get_ldflags ldflags)
201
     IF_DEFINED CMAKE_C_OSX_CURRENT_VERSION_FLAG)
202
   libomp_append(ldflags_local "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${LIBOMP_VERSION_MAJOR}.${LIBOMP_VERSION_MINOR}"
203
     IF_DEFINED CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG)
204
-  libomp_append(ldflags_local -Wl,--warn-shared-textrel LIBOMP_HAVE_WARN_SHARED_TEXTREL_FLAG)
205
   libomp_append(ldflags_local -Wl,--as-needed LIBOMP_HAVE_AS_NEEDED_FLAG)
206
   libomp_append(ldflags_local "-Wl,--version-script=${LIBOMP_SRC_DIR}/exports_so.txt" LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
207
   libomp_append(ldflags_local -static-libgcc LIBOMP_HAVE_STATIC_LIBGCC_FLAG)
208
diff --git openmp/runtime/cmake/config-ix.cmake openmp/runtime/cmake/config-ix.cmake
209
index 0fe1266b0067..d3806a446743 100644
210
--- openmp/runtime/cmake/config-ix.cmake
211
+++ openmp/runtime/cmake/config-ix.cmake
212
@@ -131,9 +131,8 @@ if(WIN32)
213
   libomp_check_linker_flag(/SAFESEH LIBOMP_HAVE_SAFESEH_FLAG)
214
 elseif(NOT APPLE)
215
   libomp_check_linker_flag(-Wl,-x LIBOMP_HAVE_X_FLAG)
216
-  libomp_check_linker_flag(-Wl,--warn-shared-textrel LIBOMP_HAVE_WARN_SHARED_TEXTREL_FLAG)
217
   libomp_check_linker_flag(-Wl,--as-needed LIBOMP_HAVE_AS_NEEDED_FLAG)
218
-  libomp_check_linker_flag("-Wl,--version-script=${LIBOMP_SRC_DIR}/exports_so.txt" LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
219
+  libomp_check_linker_flag("-Wl,--version-script=${LIBOMP_SRC_DIR}/exports_test_so.txt" LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
220
   libomp_check_linker_flag(-static-libgcc LIBOMP_HAVE_STATIC_LIBGCC_FLAG)
221
   libomp_check_linker_flag(-Wl,-z,noexecstack LIBOMP_HAVE_Z_NOEXECSTACK_FLAG)
222
 endif()
223
diff --git openmp/runtime/src/exports_so.txt openmp/runtime/src/exports_so.txt
224
index ac188af31055..834c6118d820 100644
225
--- openmp/runtime/src/exports_so.txt
226
+++ openmp/runtime/src/exports_so.txt
227
@@ -71,10 +71,8 @@ VERSION {
228
         __kmp_fork_call;
229
         __kmp_invoke_microtask;
230
 #if KMP_USE_MONITOR
231
-        __kmp_launch_monitor;
232
         __kmp_reap_monitor;
233
 #endif
234
-        __kmp_launch_worker;
235
         __kmp_reap_worker;
236
         __kmp_release_64;
237
         __kmp_wait_64;
238
diff --git openmp/runtime/src/exports_test_so.txt openmp/runtime/src/exports_test_so.txt
239
new file mode 100644
240
index 000000000000..912d160e7c06
241
--- /dev/null
242
+++ openmp/runtime/src/exports_test_so.txt
243
@@ -0,0 +1,60 @@
244
+# exports_test_so.txt #
245
+
246
+#
247
+#//===----------------------------------------------------------------------===//
248
+#//
249
+#// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
250
+#// See https://llvm.org/LICENSE.txt for license information.
251
+#// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
252
+#//
253
+#//===----------------------------------------------------------------------===//
254
+#
255
+
256
+# This is used only to test if the linker supports version scripts. If the full
257
+# version script it used we may error on undefined symbols and erroneously fail.
258
+
259
+VERSION {
260
+
261
+    global: # Exported symbols.
262
+
263
+        *;         # All symbols as exported for testing.
264
+
265
+    local: # Non-exported symbols.
266
+
267
+        *;         # All other symbols are not exported.
268
+
269
+}; # VERSION
270
+
271
+# sets up GCC OMP_ version dependency chain
272
+OMP_1.0 {
273
+};
274
+OMP_2.0 {
275
+} OMP_1.0;
276
+OMP_3.0 {
277
+} OMP_2.0;
278
+OMP_3.1 {
279
+} OMP_3.0;
280
+OMP_4.0 {
281
+} OMP_3.1;
282
+OMP_4.5 {
283
+} OMP_4.0;
284
+OMP_5.0 {
285
+} OMP_4.5;
286
+
287
+# sets up GCC GOMP_ version dependency chain
288
+GOMP_1.0 {
289
+};
290
+GOMP_2.0 {
291
+} GOMP_1.0;
292
+GOMP_3.0 {
293
+} GOMP_2.0;
294
+GOMP_4.0 {
295
+} GOMP_3.0;
296
+GOMP_4.5 {
297
+} GOMP_4.0;
298
+GOMP_5.0 {
299
+} GOMP_4.5;
300
+GOMP_5.0.1 {
301
+} GOMP_5.0;
302
+
303
+# end of file #
304
diff --git openmp/runtime/src/kmp_runtime.cpp openmp/runtime/src/kmp_runtime.cpp
305
index e1af2f43dae7..3db713e8c88b 100644
306
--- openmp/runtime/src/kmp_runtime.cpp
307
+++ openmp/runtime/src/kmp_runtime.cpp
308
@@ -9156,3 +9156,20 @@ void __kmp_set_nesting_mode_threads() {
309
   if (__kmp_nesting_mode == 1) // turn on nesting for this case only
310
     set__max_active_levels(thread, __kmp_nesting_mode_nlevels);
311
 }
312
+
313
+// Empty symbols to export (see exports_so.txt) when feature is disabled
314
+extern "C" {
315
+#if !KMP_STATS_ENABLED
316
+void __kmp_reset_stats() {}
317
+#endif
318
+#if !USE_DEBUGGER
319
+int __kmp_omp_debug_struct_info = FALSE;
320
+int __kmp_debugging = FALSE;
321
+#endif
322
+#if !USE_ITT_BUILD || !USE_ITT_NOTIFY
323
+void __kmp_itt_fini_ittlib() {}
324
+void __kmp_itt_init_ittlib() {}
325
+#endif
326
+}
327
+
328
+// end of file
329
diff --git openmp/runtime/src/kmp_utility.cpp openmp/runtime/src/kmp_utility.cpp
330
index 48d31e5ee7b7..5937f8026e39 100644
331
--- openmp/runtime/src/kmp_utility.cpp
332
+++ openmp/runtime/src/kmp_utility.cpp
333
@@ -403,3 +403,16 @@ void __kmp_expand_file_name(char *result, size_t rlen, char *pattern) {
334
 
335
   *pos = '\0';
336
 }
337
+
338
+#if !OMPT_SUPPORT
339
+extern "C" {
340
+typedef struct ompt_start_tool_result_t ompt_start_tool_result_t;
341
+// Define symbols expected by VERSION script
342
+ompt_start_tool_result_t *ompt_start_tool(unsigned int omp_version,
343
+                                          const char *runtime_version) {
344
+  return nullptr;
345
+}
346
+
347
+void ompt_libomp_connect(ompt_start_tool_result_t *result) { result = nullptr; }
348
+}
349
+#endif
350
diff --git openmp/runtime/src/z_Linux_util.cpp openmp/runtime/src/z_Linux_util.cpp
351
index 5cd6ad6a0339..f6cad7b5320a 100644
352
--- openmp/runtime/src/z_Linux_util.cpp
353
+++ openmp/runtime/src/z_Linux_util.cpp
354
@@ -987,7 +987,7 @@ void __kmp_exit_thread(int exit_status) {
355
 #if KMP_USE_MONITOR
356
 void __kmp_resume_monitor();
357
 
358
-void __kmp_reap_monitor(kmp_info_t *th) {
359
+extern "C" void __kmp_reap_monitor(kmp_info_t *th) {
360
   int status;
361
   void *exit_val;
362
 
363
@@ -1029,6 +1029,12 @@ void __kmp_reap_monitor(kmp_info_t *th) {
364
 
365
   KMP_MB(); /* Flush all pending memory write invalidates.  */
366
 }
367
+#else
368
+// Empty symbol to export (see exports_so.txt) when
369
+// monitor thread feature is disabled
370
+extern "C" void __kmp_reap_monitor(kmp_info_t *th) {
371
+  (void)th;
372
+}
373
 #endif // KMP_USE_MONITOR
374
 
375
 void __kmp_reap_worker(kmp_info_t *th) {
(-)b/lang/julia/files/patch-Make.inc (-9 / +24 lines)
Lines 1-4 Link Here
1
--- Make.inc.orig	2023-08-24 16:20:21 UTC
1
--- Make.inc.orig	2023-11-14 16:57:00 UTC
2
+++ Make.inc
2
+++ Make.inc
3
@@ -268,7 +268,7 @@ docdir := $(datarootdir)/doc/julia
3
@@ -268,7 +268,7 @@ docdir := $(datarootdir)/doc/julia
4
 libexecdir := $(prefix)/libexec
4
 libexecdir := $(prefix)/libexec
Lines 52-58 Link Here
52
 ifneq ($(CC_BASE)$(CXX_BASE),$(shell echo $(CC) | cut -d' ' -f1)$(shell echo $(CXX) | cut -d' ' -f1))
52
 ifneq ($(CC_BASE)$(CXX_BASE),$(shell echo $(CC) | cut -d' ' -f1)$(shell echo $(CXX) | cut -d' ' -f1))
53
     $(error Forgot override directive on CC or CXX in Make.user? Cowardly refusing to build)
53
     $(error Forgot override directive on CC or CXX in Make.user? Cowardly refusing to build)
54
 endif
54
 endif
55
@@ -1295,14 +1268,8 @@ JLDFLAGS += -Wl,-Bdynamic
55
@@ -1278,7 +1251,7 @@ JLDFLAGS += -Wl,-Bdynamic
56
 JCPPFLAGS += -DJULIA_HAS_IFUNC_SUPPORT=1
57
 endif
58
 JLDFLAGS += -Wl,-Bdynamic
59
-OSLIBS += -Wl,--version-script=$(JULIAHOME)/src/julia.expmap
60
+OSLIBS = -Wl,--version-script=$(JULIAHOME)/src/julia.expmap
61
 ifneq ($(SANITIZE),1)
62
 JLDFLAGS += -Wl,-no-undefined
63
 endif
64
@@ -1295,16 +1268,12 @@ JLDFLAGS += -Wl,-Bdynamic
56
 
65
 
57
 ifeq ($(OS), FreeBSD)
66
 ifeq ($(OS), FreeBSD)
58
 JLDFLAGS += -Wl,-Bdynamic
67
 JLDFLAGS += -Wl,-Bdynamic
Lines 65-74 Link Here
65
-# See #21788
74
-# See #21788
66
-OSLIBS += -lgcc_s
75
-OSLIBS += -lgcc_s
67
-
76
-
68
 OSLIBS += -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \
77
-OSLIBS += -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \
69
 	$(NO_WHOLE_ARCHIVE)
78
-	$(NO_WHOLE_ARCHIVE)
79
+JLIBVERFLAGS = -Wl,--version-script=$(JULIAHOME)/src/julialib.expmap
80
+JCGVERFLAGS = -Wl,--version-script=$(JULIAHOME)/src/juliacg.expmap
81
+JEXEVERFLAGS = -Wl,--version-script=$(JULIAHOME)/src/flisp/juliaexe.expmap
82
+OSLIBS += -Wl,--export-dynamic $(NO_WHOLE_ARCHIVE)
70
 endif
83
 endif
71
@@ -1511,30 +1478,6 @@ LIBJULIACODEGEN_DEBUG_INSTALL_DEPLIB := $(call dep_lib
84
 
85
 ifeq ($(OS), Darwin)
86
@@ -1511,30 +1480,6 @@ LIBJULIACODEGEN_DEBUG_INSTALL_DEPLIB := $(call dep_lib
72
 LIBJULIACODEGEN_DEBUG_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT))
87
 LIBJULIACODEGEN_DEBUG_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT))
73
 LIBJULIACODEGEN_DEBUG_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$(private_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT))
88
 LIBJULIACODEGEN_DEBUG_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$(private_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT))
74
 
89
 
Lines 99-105 Link Here
99
 # USE_SYSTEM_CSL causes it to get symlinked into build_private_shlibdir
114
 # USE_SYSTEM_CSL causes it to get symlinked into build_private_shlibdir
100
 ifeq ($(USE_SYSTEM_CSL),1)
115
 ifeq ($(USE_SYSTEM_CSL),1)
101
 LIBGCC_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_private_shlibdir)/$(LIBGCC_NAME))
116
 LIBGCC_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_private_shlibdir)/$(LIBGCC_NAME))
102
@@ -1567,7 +1510,6 @@ LIBM_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$
117
@@ -1567,7 +1512,6 @@ LIBM_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$
103
 LIBM_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$(private_shlibdir)/$(LIBMNAME).$(SHLIB_EXT))
118
 LIBM_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$(private_shlibdir)/$(LIBMNAME).$(SHLIB_EXT))
104
 
119
 
105
 # We list:
120
 # We list:
Lines 107-113 Link Here
107
 #  * libopenlibm, because Windows has an untrustworthy libm, and we want to use ours more than theirs
122
 #  * libopenlibm, because Windows has an untrustworthy libm, and we want to use ours more than theirs
108
 #  * libstdc++, because while performing `libstdc++` probing we need to
123
 #  * libstdc++, because while performing `libstdc++` probing we need to
109
 #    know the path to the bundled `libstdc++` library.
124
 #    know the path to the bundled `libstdc++` library.
110
@@ -1589,7 +1531,6 @@ LOADER_BUILD_DEP_LIBS = $(call build_deplibs, \
125
@@ -1589,7 +1533,6 @@ LOADER_BUILD_DEP_LIBS = $(call build_deplibs, \
111
 endef
126
 endef
112
 
127
 
113
 LOADER_BUILD_DEP_LIBS = $(call build_deplibs, \
128
 LOADER_BUILD_DEP_LIBS = $(call build_deplibs, \
Lines 115-121 Link Here
115
     $(LIBM_BUILD_DEPLIB) \
130
     $(LIBM_BUILD_DEPLIB) \
116
     @$(LIBSTDCXX_BUILD_DEPLIB) \
131
     @$(LIBSTDCXX_BUILD_DEPLIB) \
117
     @$(LIBJULIAINTERNAL_BUILD_DEPLIB) \
132
     @$(LIBJULIAINTERNAL_BUILD_DEPLIB) \
118
@@ -1597,7 +1538,6 @@ LOADER_DEBUG_BUILD_DEP_LIBS = $(call build_deplibs, \
133
@@ -1597,7 +1540,6 @@ LOADER_DEBUG_BUILD_DEP_LIBS = $(call build_deplibs, \
119
 )
134
 )
120
 
135
 
121
 LOADER_DEBUG_BUILD_DEP_LIBS = $(call build_deplibs, \
136
 LOADER_DEBUG_BUILD_DEP_LIBS = $(call build_deplibs, \
Lines 123-129 Link Here
123
    $(LIBM_BUILD_DEPLIB) \
138
    $(LIBM_BUILD_DEPLIB) \
124
    @$(LIBSTDCXX_BUILD_DEPLIB) \
139
    @$(LIBSTDCXX_BUILD_DEPLIB) \
125
    @$(LIBJULIAINTERNAL_DEBUG_BUILD_DEPLIB) \
140
    @$(LIBJULIAINTERNAL_DEBUG_BUILD_DEPLIB) \
126
@@ -1605,14 +1545,12 @@ LOADER_INSTALL_DEP_LIBS = $(call build_deplibs, \
141
@@ -1605,14 +1547,12 @@ LOADER_INSTALL_DEP_LIBS = $(call build_deplibs, \
127
 )
142
 )
128
 
143
 
129
 LOADER_INSTALL_DEP_LIBS = $(call build_deplibs, \
144
 LOADER_INSTALL_DEP_LIBS = $(call build_deplibs, \
(-)b/lang/julia/files/patch-deps_llvm.mk (+45 lines)
Added Link Here
1
--- deps/llvm.mk.orig	2023-12-03 21:24:39 UTC
2
+++ deps/llvm.mk
3
@@ -60,7 +60,10 @@ endif
4
 LLVM_ENABLE_PROJECTS := $(LLVM_ENABLE_PROJECTS);lld
5
 endif
6
 
7
+LLVM_BUILD_BENCHMARKS?=1
8
+LLVM_INCLUDE_BENCHMARKS?=1
9
 
10
+
11
 LLVM_LIB_FILE := libLLVMCodeGen.a
12
 
13
 # Figure out which targets to build
14
@@ -76,6 +79,8 @@ LLVM_CMAKE += -DLLVM_ENABLE_RUNTIMES="$(LLVM_ENABLE_RU
15
 LLVM_CMAKE += -DLLVM_ENABLE_PROJECTS="$(LLVM_ENABLE_PROJECTS)"
16
 LLVM_CMAKE += -DLLVM_EXTERNAL_PROJECTS="$(LLVM_EXTERNAL_PROJECTS)"
17
 LLVM_CMAKE += -DLLVM_ENABLE_RUNTIMES="$(LLVM_ENABLE_RUNTIMES)"
18
+LLVM_CMAKE += -DLLVM_ENABLE_BENCHMARKS="$(LLVM_ENABLE_BENCHMARKS)"
19
+LLVM_CMAKE += -DLLVM_INCLUDE_BENCHMARKS="$(LLVM_INCLUDE_BENCHMARKS)"
20
 
21
 ifeq ($(USE_RV),1)
22
 LLVM_CMAKE += -DLLVM_EXTERNAL_RV_SOURCE_DIR=$(LLVM_MONOSRC_DIR)/rv
23
@@ -90,6 +95,9 @@ LLVM_LDFLAGS += $(LDFLAGS)
24
 LLVM_CXXFLAGS += $(CXXFLAGS)
25
 LLVM_CPPFLAGS += $(CPPFLAGS)
26
 LLVM_LDFLAGS += $(LDFLAGS)
27
+LLVM_CFLAGS += -I$(SRCCACHE)/$(LLVM_SRC_DIR)/third-party/benchmark/include
28
+LLVM_LDFLAGS += -L$(LLVM_BUILDDIR_withtype)/lib
29
+LLVM_CPPFLAGS += -I$(SRCCACHE)/$(LLVM_SRC_DIR)/third-party/benchmark/include
30
 LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)"
31
 LLVM_CMAKE += -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD:STRING="$(LLVM_EXPERIMENTAL_TARGETS)"
32
 LLVM_CMAKE += -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))"
33
@@ -231,6 +239,12 @@ $(eval $(call LLVM_PATCH,llvm-ittapi-cmake))
34
 endef
35
 
36
 $(eval $(call LLVM_PATCH,llvm-ittapi-cmake))
37
+
38
+$(SRCCACHE)/$(LLVM_SRC_DIR)/verfix.patch-applied: $(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted $(LLVM_PATCH_VERSIONFIXES)
39
+	cd $(SRCCACHE)/$(LLVM_SRC_DIR) && patch < $(LLVM_PATCH_VERSIONFIXES)
40
+	echo 1 > $@
41
+
42
+$(LLVM_BUILDDIR_withtype)/build-configured: | $(SRCCACHE)/$(LLVM_SRC_DIR)/verfix.patch-applied
43
 
44
 ifeq ($(USE_SYSTEM_ZLIB), 0)
45
 $(LLVM_BUILDDIR_withtype)/build-configured: | $(build_prefix)/manifest/zlib
(-)b/lang/julia/files/patch-src_Makefile (+77 lines)
Added Link Here
1
--- src/Makefile.orig	2023-11-14 16:57:00 UTC
2
+++ src/Makefile
3
@@ -363,15 +363,40 @@ CXXLD = $(CXX) -shared
4
 
5
 CXXLD = $(CXX) -shared
6
 
7
-$(build_shlibdir)/libjulia-internal.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a $(LIBUV)
8
+$(BUILDDIR)/julialib.expmap $(BUILDDIR)/juliacg.expmap: $(SRCDIR)/julia.expmap
9
+	sed <'$<' >$(BUILDDIR)/julialib.expmap \
10
+		-e "/environ;/d" -e "/__progname;/d" \
11
+		-e "/__stack_chk_guard;/d" -e "/asprintf;/d" \
12
+		-e "/small_arraylist_grow;/d" -e "/rec_backtrace;/d" \
13
+		-e "/libsupport_init;/d" -e "/localtime_r;/d" \
14
+		-e "/restore_arg_area_loc;/d" -e "/restore_signals;/d" \
15
+		-e "/rl_clear_input;/d" -e "/save_arg_area_loc;/d" \
16
+		-e "/add_library_mapping;/d" -e "/_IO_stdin_used;/d" \
17
+		-e "/llvmGetPassPluginInfo;/d"
18
+	sed <'$<' >$(BUILDDIR)/juliacg.expmap \
19
+		-e "/environ;/d" -e "/__progname;/d" \
20
+		-e "/__stack_chk_guard;/d" -e "/asprintf;/d" \
21
+		-e "/arraylist_grow;/d" -e "/small_arraylist_grow;/d" \
22
+		-e "/rec_backtrace;/d" -e "/libsupport_init;/d" \
23
+		-e "/localtime_r;/d" -e "/memhash;/d" -e "/memhash32;/d" \
24
+		-e "/memhash32_seed;/d" -e "/memhash_seed;/d" \
25
+		-e "/restore_arg_area_loc;/d" -e "/restore_signals;/d" \
26
+		-e "/jlbacktrace;/d" -e "/jlbacktracet;/d" \
27
+		-e "/rl_clear_input;/d" -e "/save_arg_area_loc;/d" \
28
+		-e "/add_library_mapping;/d" -e "/_IO_stdin_used;/d" \
29
+		-e "/N4llvm9StringRefEi;/d" -e "/llvmGetPassPluginInfo;/d"
30
+
31
+$(build_shlibdir)/libjulia-internal.$(JL_MAJOR_MINOR_SHLIB_EXT): $(BUILDDIR)/julialib.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a $(LIBUV)
32
 	@$(call PRINT_LINK, $(CXXLD) $(call IMPLIB_FLAGS,$@) $(JCXXFLAGS) $(JL_CXXFLAGS) $(CXXLDFLAGS) $(SHIPFLAGS) $(OBJS) $(RPATH_LIB) -o $@ \
33
-		$(JLDFLAGS) $(JLIBLDFLAGS) $(RT_RELEASE_LIBS) $(call SONAME_FLAGS,libjulia-internal.$(JL_MAJOR_SHLIB_EXT)))
34
+		$(JLDFLAGS) $(JLIBLDFLAGS) $(RT_RELEASE_LIBS) $(JLIBVERFLAGS) \
35
+		$(call SONAME_FLAGS,libjulia-internal.$(JL_MAJOR_SHLIB_EXT)))
36
 	@$(INSTALL_NAME_CMD)libjulia-internal.$(SHLIB_EXT) $@
37
 	$(DSYMUTIL) $@
38
 
39
-$(build_shlibdir)/libjulia-internal-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a $(LIBUV)
40
+$(build_shlibdir)/libjulia-internal-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(BUILDDIR)/julialib.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a $(LIBUV)
41
 	@$(call PRINT_LINK, $(CXXLD) $(call IMPLIB_FLAGS,$@) $(JCXXFLAGS) $(JL_CXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(DOBJS) $(RPATH_LIB) -o $@ \
42
-		$(JLDFLAGS) $(JLIBLDFLAGS) $(RT_DEBUG_LIBS) $(call SONAME_FLAGS,libjulia-internal-debug.$(JL_MAJOR_SHLIB_EXT)))
43
+		$(JLDFLAGS) $(JLIBLDFLAGS) $(RT_DEBUG_LIBS) $(JLIBVERFLAGS) \
44
+		$(call SONAME_FLAGS,libjulia-internal-debug.$(JL_MAJOR_SHLIB_EXT)))
45
 	@$(INSTALL_NAME_CMD)libjulia-internal-debug.$(SHLIB_EXT) $@
46
 	$(DSYMUTIL) $@
47
 
48
@@ -389,15 +414,17 @@ libjulia-internal-debug libjulia-internal-release: $(P
49
 libjulia-internal-debug: $(build_shlibdir)/libjulia-internal-debug.$(JL_MAJOR_MINOR_SHLIB_EXT)
50
 libjulia-internal-debug libjulia-internal-release: $(PUBLIC_HEADER_TARGETS)
51
 
52
-$(build_shlibdir)/libjulia-codegen.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(CODEGEN_OBJS) $(BUILDDIR)/support/libsupport.a $(build_shlibdir)/libjulia-internal.$(JL_MAJOR_MINOR_SHLIB_EXT)
53
+$(build_shlibdir)/libjulia-codegen.$(JL_MAJOR_MINOR_SHLIB_EXT): $(BUILDDIR)/julialib.expmap $(CODEGEN_OBJS) $(BUILDDIR)/support/libsupport.a $(build_shlibdir)/libjulia-internal.$(JL_MAJOR_MINOR_SHLIB_EXT)
54
 	@$(call PRINT_LINK, $(CXXLD) $(call IMPLIB_FLAGS,$@) $(JCXXFLAGS) $(JL_CXXFLAGS) $(CXXLDFLAGS) $(SHIPFLAGS) $(CODEGEN_OBJS) $(RPATH_LIB) -o $@ \
55
-		$(JLDFLAGS) $(JLIBLDFLAGS) $(CG_RELEASE_LIBS) $(call SONAME_FLAGS,libjulia-codegen.$(JL_MAJOR_SHLIB_EXT)))
56
+		$(JLDFLAGS) $(JLIBLDFLAGS) $(CG_RELEASE_LIBS) $(JCGVERFLAGS) \
57
+		$(call SONAME_FLAGS,libjulia-codegen.$(JL_MAJOR_SHLIB_EXT)))
58
 	@$(INSTALL_NAME_CMD)libjulia-codegen.$(SHLIB_EXT) $@
59
 	$(DSYMUTIL) $@
60
 
61
-$(build_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(CODEGEN_DOBJS) $(BUILDDIR)/support/libsupport-debug.a $(build_shlibdir)/libjulia-internal-debug.$(JL_MAJOR_MINOR_SHLIB_EXT)
62
+$(build_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(BUILDDIR)/julialib.expmap $(CODEGEN_DOBJS) $(BUILDDIR)/support/libsupport-debug.a $(build_shlibdir)/libjulia-internal-debug.$(JL_MAJOR_MINOR_SHLIB_EXT)
63
 	@$(call PRINT_LINK, $(CXXLD) $(call IMPLIB_FLAGS,$@) $(JCXXFLAGS) $(JL_CXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(CODEGEN_DOBJS) $(RPATH_LIB) -o $@ \
64
-		$(JLDFLAGS) $(JLIBLDFLAGS) $(CG_DEBUG_LIBS) $(call SONAME_FLAGS,libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT)))
65
+		$(JLDFLAGS) $(JLIBLDFLAGS) $(CG_DEBUG_LIBS) $(JCGVERFLAGS) \
66
+		$(call SONAME_FLAGS,libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT)))
67
 	@$(INSTALL_NAME_CMD)libjulia-codegen-debug.$(SHLIB_EXT) $@
68
 	$(DSYMUTIL) $@
69
 
70
@@ -420,6 +447,7 @@ clean:
71
 	-rm -f $(BUILDDIR)/julia_flisp.boot $(BUILDDIR)/julia_flisp.boot.inc $(BUILDDIR)/jl_internal_funcs.inc
72
 	-rm -f $(BUILDDIR)/*.dbg.obj $(BUILDDIR)/*.o $(BUILDDIR)/*.dwo $(BUILDDIR)/*.$(SHLIB_EXT) $(BUILDDIR)/*.a $(BUILDDIR)/*.h.gen
73
 	-rm -f $(BUILDDIR)/julia_version.h
74
+	-rm -f $(BUILDDIR)/julialib.expmap $(BUILDDIR)/juliacg.exmap
75
 
76
 clean-flisp:
77
 	-$(MAKE) -C $(SRCDIR)/flisp clean BUILDDIR='$(abspath $(BUILDDIR)/flisp)'
(-)b/lang/julia/files/patch-src_flisp_Makefile (+36 lines)
Added Link Here
1
--- src/flisp/Makefile.orig	2023-11-14 16:57:00 UTC
2
+++ src/flisp/Makefile
3
@@ -95,12 +95,22 @@ CCLD := $(CC)
4
 
5
 CCLD := $(CC)
6
 
7
-$(BUILDDIR)/$(EXENAME)-debug$(EXE): $(DOBJS) $(LIBFILES_debug) $(BUILDDIR)/$(LIBTARGET)-debug.a $(BUILDDIR)/flmain.dbg.obj | $(BUILDDIR)/flisp.boot
8
-	@$(call PRINT_LINK, $(CCLD) $(DEBUGFLAGS) $(JLDFLAGS) $(DOBJS) $(BUILDDIR)/flmain.dbg.obj -o $@ $(BUILDDIR)/$(LIBTARGET)-debug.a $(LIBFILES_debug) $(LIBS) $(OSLIBS))
9
+$(BUILDDIR)/juliaexe.expmap: $(JULIAHOME)/src/julia.expmap
10
+	sed <'$<' >'$@' \
11
+		-e "/__stack_chk_guard;/d" -e "/asprintf;/d" \
12
+		-e "/rec_backtrace;/d" -e "/localtime_r;/d" \
13
+		-e "/restore_arg_area_loc;/d" -e "/restore_signals;/d" \
14
+		-e "/rl_clear_input;/d" -e "/save_arg_area_loc;/d" \
15
+		-e "/add_library_mapping;/d" -e "/jlbacktrace;/d" \
16
+		-e "/jlbacktracet;/d" -e "/_IO_stdin_used;/d" \
17
+		-e "/N4llvm9StringRefEi;/d" -e "/llvmGetPassPluginInfo;/d"
18
 
19
-$(BUILDDIR)/$(EXENAME)$(EXE): $(OBJS) $(LIBFILES_release) $(BUILDDIR)/$(LIBTARGET).a $(BUILDDIR)/flmain.o | $(BUILDDIR)/flisp.boot
20
-	@$(call PRINT_LINK, $(CCLD) $(SHIPFLAGS) $(JLDFLAGS) $(OBJS) $(BUILDDIR)/flmain.o -o $@ $(BUILDDIR)/$(LIBTARGET).a $(LIBFILES_release) $(LIBS) $(OSLIBS))
21
+$(BUILDDIR)/$(EXENAME)-debug$(EXE): $(DOBJS) $(LIBFILES_debug) $(BUILDDIR)/$(LIBTARGET)-debug.a $(BUILDDIR)/flmain.dbg.obj $(BUILDDIR)/juliaexe.expmap | $(BUILDDIR)/flisp.boot
22
+	@$(call PRINT_LINK, $(CCLD) $(DEBUGFLAGS) $(JLDFLAGS) $(DOBJS) $(BUILDDIR)/flmain.dbg.obj -o $@ $(BUILDDIR)/$(LIBTARGET)-debug.a $(LIBFILES_debug) $(LIBS) $(OSLIBS) $(JEXEVERFLAGS))
23
 
24
+$(BUILDDIR)/$(EXENAME)$(EXE): $(OBJS) $(LIBFILES_release) $(BUILDDIR)/$(LIBTARGET).a $(BUILDDIR)/flmain.o $(BUILDDIR)/juliaexe.expmap | $(BUILDDIR)/flisp.boot
25
+	@$(call PRINT_LINK, $(CCLD) $(SHIPFLAGS) $(JLDFLAGS) $(OBJS) $(BUILDDIR)/flmain.o -o $@ $(BUILDDIR)/$(LIBTARGET).a $(LIBFILES_release) $(LIBS) $(OSLIBS) $(JEXEVERFLAGS))
26
+
27
 $(BUILDDIR)/host/Makefile:
28
 	mkdir -p $(BUILDDIR)/host
29
 	@# add Makefiles to the build directories for convenience (pointing back to the source location of each)
30
@@ -133,5 +143,6 @@ clean:
31
 	rm -f $(BUILDDIR)/$(EXENAME)$(EXE)
32
 	rm -f $(BUILDDIR)/$(EXENAME)-debug$(EXE)
33
 	rm -f $(BUILDDIR)/host/*
34
+	rm -f $(BUILDDIR)/*.expmap
35
 
36
 .PHONY: flisp-deps

Return to bug 277697