FreeBSD Bugzilla – Attachment 249166 Details for
Bug 277697
lang/julia: 1.9.4, unbreak build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
unbreak build + elfctl wxneeded
julia-1.9.4_3.patch (text/plain), 27.62 KB, created by
Hiroo Ono
on 2024-03-14 15:56:22 UTC
(
hide
)
Description:
unbreak build + elfctl wxneeded
Filename:
MIME Type:
Creator:
Hiroo Ono
Created:
2024-03-14 15:56:22 UTC
Size:
27.62 KB
patch
obsolete
>diff --git a/lang/julia/Makefile b/lang/julia/Makefile >index 7f58a71dc3..9ce33333ab 100644 >--- a/lang/julia/Makefile >+++ b/lang/julia/Makefile >@@ -1,6 +1,6 @@ > PORTNAME= julia > DISTVERSION= 1.9.4 >-PORTREVISION= 2 >+PORTREVISION= 3 > DISTVERSIONSUFFIX= -full > CATEGORIES= lang math > MASTER_SITES= https://github.com/JuliaLang/${PORTNAME}/releases/download/v${DISTVERSION}/ >@@ -39,11 +39,13 @@ BUILD_DEPENDS_amd64= ittapi>0:devel/ittapi > BUILD_DEPENDS_i386= ittapi>0:devel/ittapi > > # Do not set USES=fortran to avoid extra-linkage >-USES= gmake cpe python perl5 blaslapack:openblas >+USES= blaslapack:openblas cpe elfctl gmake perl5 python > _GCC_VER= ${GCC_DEFAULT:S/.//} > > CPE_VENDOR= julialang > >+ELF_FEATURES= +wxneeded:usr/bin/julia >+ > USE_CXXSTD= c++14 > USE_LDCONFIG= yes > >@@ -120,6 +122,8 @@ pre-configure: > ) || ( \ > echo "USE_BLAS64=0" >> ${WRKSRC}/Make.user \ > ) >+ echo 'LLVM_PATCH_VERSIONFIXES= $(FILESDIR)/llvm-patch-backport-version-fixes' \ >+ >> ${WRKSRC}/Make.user > > pre-install: > ${CP} ${WRKSRC}/deps/srccache/cacert-2022-10-11.pem ${WRKSRC}/usr/share/julia/cert.pem >diff --git a/lang/julia/files/llvm-patch-backport-version-fixes b/lang/julia/files/llvm-patch-backport-version-fixes >new file mode 100644 >index 0000000000..6964bfd7e5 >--- /dev/null >+++ b/lang/julia/files/llvm-patch-backport-version-fixes >@@ -0,0 +1,375 @@ >+diff --git llvm/tools/lto/CMakeLists.txt llvm/tools/lto/CMakeLists.txt >+index 67f6d3af40e0..9382ee9588b3 100644 >+--- llvm/tools/lto/CMakeLists.txt >++++ llvm/tools/lto/CMakeLists.txt >+@@ -19,7 +19,11 @@ set(SOURCES >+ lto.cpp >+ ) >+ >+-set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports) >++if (LLVM_LINK_LLVM_DYLIB) >++ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.dylib.exports) >++else() >++ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports) >++endif() >+ >+ if(CMAKE_SYSTEM_NAME STREQUAL AIX) >+ set(LTO_LIBRARY_TYPE MODULE) >+diff --git llvm/tools/lto/lto.dylib.exports llvm/tools/lto/lto.dylib.exports >+new file mode 100644 >+index 000000000000..4164c3919a97 >+--- /dev/null >++++ llvm/tools/lto/lto.dylib.exports >+@@ -0,0 +1,77 @@ >++lto_get_error_message >++lto_get_version >++lto_initialize_disassembler >++lto_module_create >++lto_module_create_from_fd >++lto_module_create_from_fd_at_offset >++lto_module_create_from_memory >++lto_module_create_from_memory_with_path >++lto_module_create_in_local_context >++lto_module_create_in_codegen_context >++lto_module_has_ctor_dtor >++lto_module_get_linkeropts >++lto_module_get_macho_cputype >++lto_module_get_num_symbols >++lto_module_get_symbol_attribute >++lto_module_get_symbol_name >++lto_module_get_target_triple >++lto_module_set_target_triple >++lto_module_is_object_file >++lto_module_is_object_file_for_target >++lto_module_is_object_file_in_memory >++lto_module_is_object_file_in_memory_for_target >++lto_module_has_objc_category >++lto_module_dispose >++lto_api_version >++lto_codegen_set_diagnostic_handler >++lto_codegen_add_module >++lto_codegen_set_module >++lto_codegen_add_must_preserve_symbol >++lto_codegen_compile >++lto_codegen_create >++lto_codegen_create_in_local_context >++lto_codegen_dispose >++lto_codegen_set_debug_model >++lto_codegen_set_pic_model >++lto_codegen_write_merged_modules >++lto_codegen_debug_options >++lto_codegen_debug_options_array >++lto_codegen_set_assembler_args >++lto_codegen_set_assembler_path >++lto_codegen_set_cpu >++lto_codegen_compile_to_file >++lto_codegen_optimize >++lto_codegen_compile_optimized >++lto_codegen_set_should_internalize >++lto_codegen_set_should_embed_uselists >++lto_set_debug_options >++thinlto_create_codegen >++thinlto_codegen_dispose >++thinlto_codegen_add_module >++thinlto_codegen_process >++thinlto_module_get_num_objects >++thinlto_module_get_object >++thinlto_codegen_set_pic_model >++thinlto_codegen_set_cache_dir >++thinlto_codegen_set_cache_pruning_interval >++thinlto_codegen_set_cache_entry_expiration >++thinlto_codegen_set_final_cache_size_relative_to_available_space >++thinlto_codegen_set_cache_size_bytes >++thinlto_codegen_set_cache_size_megabytes >++thinlto_codegen_set_cache_size_files >++thinlto_codegen_set_savetemps_dir >++thinlto_codegen_set_cpu >++thinlto_debug_options >++lto_module_is_thinlto >++thinlto_codegen_add_must_preserve_symbol >++thinlto_codegen_add_cross_referenced_symbol >++thinlto_codegen_set_codegen_only >++thinlto_codegen_disable_codegen >++thinlto_module_get_num_object_files >++thinlto_module_get_object_file >++thinlto_set_generated_objects_dir >++lto_input_create >++lto_input_dispose >++lto_input_get_num_dependent_libraries >++lto_input_get_dependent_library >++lto_runtime_lib_symbols_list >+diff --git llvm/tools/lto/lto.exports llvm/tools/lto/lto.exports >+index 3abae5f0fcba..4164c3919a97 100644 >+--- llvm/tools/lto/lto.exports >++++ llvm/tools/lto/lto.exports >+@@ -45,12 +45,6 @@ lto_codegen_compile_optimized >+ lto_codegen_set_should_internalize >+ lto_codegen_set_should_embed_uselists >+ lto_set_debug_options >+-LLVMCreateDisasm >+-LLVMCreateDisasmCPU >+-LLVMDisasmDispose >+-LLVMDisasmInstruction >+-LLVMSetDisasmOptions >+-LLVMCreateDisasmCPUFeatures >+ thinlto_create_codegen >+ thinlto_codegen_dispose >+ thinlto_codegen_add_module >+diff --git llvm/tools/remarks-shlib/CMakeLists.txt llvm/tools/remarks-shlib/CMakeLists.txt >+index f22cedd9ead7..2f108a42c9aa 100644 >+--- llvm/tools/remarks-shlib/CMakeLists.txt >++++ llvm/tools/remarks-shlib/CMakeLists.txt >+@@ -9,7 +9,11 @@ if(LLVM_ENABLE_PIC) >+ libremarks.cpp >+ ) >+ >+- set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) >++ if (LLVM_LINK_LLVM_DYLIB) >++ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.dylib.exports) >++ else() >++ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) >++ endif() >+ >+ add_llvm_library(Remarks SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES}) >+ >+diff --git llvm/tools/remarks-shlib/Remarks.dylib.exports llvm/tools/remarks-shlib/Remarks.dylib.exports >+new file mode 100644 >+index 000000000000..0c2a3c38c78c >+--- /dev/null >++++ llvm/tools/remarks-shlib/Remarks.dylib.exports >+@@ -0,0 +1 @@ >++LLVMRemarkVersion >+diff --git openmp/libomptarget/plugins/exports openmp/libomptarget/plugins/exports >+index 8664a2e493ee..cc7beda183af 100644 >+--- openmp/libomptarget/plugins/exports >++++ openmp/libomptarget/plugins/exports >+@@ -1,36 +1,6 @@ >+ VERS1.0 { >+ global: >+- __tgt_rtl_is_valid_binary; >+- __tgt_rtl_is_data_exchangable; >+- __tgt_rtl_number_of_devices; >+- __tgt_rtl_init_requires; >+- __tgt_rtl_init_device; >+- __tgt_rtl_load_binary; >+- __tgt_rtl_data_alloc; >+- __tgt_rtl_data_submit; >+- __tgt_rtl_data_submit_async; >+- __tgt_rtl_data_retrieve; >+- __tgt_rtl_data_retrieve_async; >+- __tgt_rtl_data_exchange; >+- __tgt_rtl_data_exchange_async; >+- __tgt_rtl_data_delete; >+- __tgt_rtl_run_target_team_region; >+- __tgt_rtl_run_target_team_region_async; >+- __tgt_rtl_run_target_region; >+- __tgt_rtl_run_target_region_async; >+- __tgt_rtl_synchronize; >+- __tgt_rtl_register_lib; >+- __tgt_rtl_unregister_lib; >+- __tgt_rtl_supports_empty_images; >+- __tgt_rtl_set_info_flag; >+- __tgt_rtl_print_device_info; >+- __tgt_rtl_create_event; >+- __tgt_rtl_record_event; >+- __tgt_rtl_wait_event; >+- __tgt_rtl_sync_event; >+- __tgt_rtl_destroy_event; >+- __tgt_rtl_init_device_info; >+- __tgt_rtl_init_async_info; >++ __tgt_rtl*; >+ local: >+ *; >+ }; >+diff --git openmp/libomptarget/src/exports openmp/libomptarget/src/exports >+index 0ef4c8cce521..425a6fad49cf 100644 >+--- openmp/libomptarget/src/exports >++++ openmp/libomptarget/src/exports >+@@ -48,7 +48,6 @@ VERS1.0 { >+ omp_get_interop_int; >+ omp_get_interop_name; >+ omp_get_interop_type_desc; >+- omp_get_interop_rc_desc; >+ __tgt_interop_init; >+ __tgt_interop_use; >+ __tgt_interop_destroy; >+diff --git openmp/runtime/cmake/LibompHandleFlags.cmake openmp/runtime/cmake/LibompHandleFlags.cmake >+index 9e19e59ba17d..1ddbc870e0f1 100644 >+--- openmp/runtime/cmake/LibompHandleFlags.cmake >++++ openmp/runtime/cmake/LibompHandleFlags.cmake >+@@ -98,7 +98,6 @@ function(libomp_get_ldflags ldflags) >+ IF_DEFINED CMAKE_C_OSX_CURRENT_VERSION_FLAG) >+ libomp_append(ldflags_local "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${LIBOMP_VERSION_MAJOR}.${LIBOMP_VERSION_MINOR}" >+ IF_DEFINED CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG) >+- libomp_append(ldflags_local -Wl,--warn-shared-textrel LIBOMP_HAVE_WARN_SHARED_TEXTREL_FLAG) >+ libomp_append(ldflags_local -Wl,--as-needed LIBOMP_HAVE_AS_NEEDED_FLAG) >+ libomp_append(ldflags_local "-Wl,--version-script=${LIBOMP_SRC_DIR}/exports_so.txt" LIBOMP_HAVE_VERSION_SCRIPT_FLAG) >+ libomp_append(ldflags_local -static-libgcc LIBOMP_HAVE_STATIC_LIBGCC_FLAG) >+diff --git openmp/runtime/cmake/config-ix.cmake openmp/runtime/cmake/config-ix.cmake >+index 0fe1266b0067..d3806a446743 100644 >+--- openmp/runtime/cmake/config-ix.cmake >++++ openmp/runtime/cmake/config-ix.cmake >+@@ -131,9 +131,8 @@ if(WIN32) >+ libomp_check_linker_flag(/SAFESEH LIBOMP_HAVE_SAFESEH_FLAG) >+ elseif(NOT APPLE) >+ libomp_check_linker_flag(-Wl,-x LIBOMP_HAVE_X_FLAG) >+- libomp_check_linker_flag(-Wl,--warn-shared-textrel LIBOMP_HAVE_WARN_SHARED_TEXTREL_FLAG) >+ libomp_check_linker_flag(-Wl,--as-needed LIBOMP_HAVE_AS_NEEDED_FLAG) >+- libomp_check_linker_flag("-Wl,--version-script=${LIBOMP_SRC_DIR}/exports_so.txt" LIBOMP_HAVE_VERSION_SCRIPT_FLAG) >++ libomp_check_linker_flag("-Wl,--version-script=${LIBOMP_SRC_DIR}/exports_test_so.txt" LIBOMP_HAVE_VERSION_SCRIPT_FLAG) >+ libomp_check_linker_flag(-static-libgcc LIBOMP_HAVE_STATIC_LIBGCC_FLAG) >+ libomp_check_linker_flag(-Wl,-z,noexecstack LIBOMP_HAVE_Z_NOEXECSTACK_FLAG) >+ endif() >+diff --git openmp/runtime/src/exports_so.txt openmp/runtime/src/exports_so.txt >+index ac188af31055..834c6118d820 100644 >+--- openmp/runtime/src/exports_so.txt >++++ openmp/runtime/src/exports_so.txt >+@@ -71,10 +71,8 @@ VERSION { >+ __kmp_fork_call; >+ __kmp_invoke_microtask; >+ #if KMP_USE_MONITOR >+- __kmp_launch_monitor; >+ __kmp_reap_monitor; >+ #endif >+- __kmp_launch_worker; >+ __kmp_reap_worker; >+ __kmp_release_64; >+ __kmp_wait_64; >+diff --git openmp/runtime/src/exports_test_so.txt openmp/runtime/src/exports_test_so.txt >+new file mode 100644 >+index 000000000000..912d160e7c06 >+--- /dev/null >++++ openmp/runtime/src/exports_test_so.txt >+@@ -0,0 +1,60 @@ >++# exports_test_so.txt # >++ >++# >++#//===----------------------------------------------------------------------===// >++#// >++#// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. >++#// See https://llvm.org/LICENSE.txt for license information. >++#// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception >++#// >++#//===----------------------------------------------------------------------===// >++# >++ >++# This is used only to test if the linker supports version scripts. If the full >++# version script it used we may error on undefined symbols and erroneously fail. >++ >++VERSION { >++ >++ global: # Exported symbols. >++ >++ *; # All symbols as exported for testing. >++ >++ local: # Non-exported symbols. >++ >++ *; # All other symbols are not exported. >++ >++}; # VERSION >++ >++# sets up GCC OMP_ version dependency chain >++OMP_1.0 { >++}; >++OMP_2.0 { >++} OMP_1.0; >++OMP_3.0 { >++} OMP_2.0; >++OMP_3.1 { >++} OMP_3.0; >++OMP_4.0 { >++} OMP_3.1; >++OMP_4.5 { >++} OMP_4.0; >++OMP_5.0 { >++} OMP_4.5; >++ >++# sets up GCC GOMP_ version dependency chain >++GOMP_1.0 { >++}; >++GOMP_2.0 { >++} GOMP_1.0; >++GOMP_3.0 { >++} GOMP_2.0; >++GOMP_4.0 { >++} GOMP_3.0; >++GOMP_4.5 { >++} GOMP_4.0; >++GOMP_5.0 { >++} GOMP_4.5; >++GOMP_5.0.1 { >++} GOMP_5.0; >++ >++# end of file # >+diff --git openmp/runtime/src/kmp_runtime.cpp openmp/runtime/src/kmp_runtime.cpp >+index e1af2f43dae7..3db713e8c88b 100644 >+--- openmp/runtime/src/kmp_runtime.cpp >++++ openmp/runtime/src/kmp_runtime.cpp >+@@ -9156,3 +9156,20 @@ void __kmp_set_nesting_mode_threads() { >+ if (__kmp_nesting_mode == 1) // turn on nesting for this case only >+ set__max_active_levels(thread, __kmp_nesting_mode_nlevels); >+ } >++ >++// Empty symbols to export (see exports_so.txt) when feature is disabled >++extern "C" { >++#if !KMP_STATS_ENABLED >++void __kmp_reset_stats() {} >++#endif >++#if !USE_DEBUGGER >++int __kmp_omp_debug_struct_info = FALSE; >++int __kmp_debugging = FALSE; >++#endif >++#if !USE_ITT_BUILD || !USE_ITT_NOTIFY >++void __kmp_itt_fini_ittlib() {} >++void __kmp_itt_init_ittlib() {} >++#endif >++} >++ >++// end of file >+diff --git openmp/runtime/src/kmp_utility.cpp openmp/runtime/src/kmp_utility.cpp >+index 48d31e5ee7b7..5937f8026e39 100644 >+--- openmp/runtime/src/kmp_utility.cpp >++++ openmp/runtime/src/kmp_utility.cpp >+@@ -403,3 +403,16 @@ void __kmp_expand_file_name(char *result, size_t rlen, char *pattern) { >+ >+ *pos = '\0'; >+ } >++ >++#if !OMPT_SUPPORT >++extern "C" { >++typedef struct ompt_start_tool_result_t ompt_start_tool_result_t; >++// Define symbols expected by VERSION script >++ompt_start_tool_result_t *ompt_start_tool(unsigned int omp_version, >++ const char *runtime_version) { >++ return nullptr; >++} >++ >++void ompt_libomp_connect(ompt_start_tool_result_t *result) { result = nullptr; } >++} >++#endif >+diff --git openmp/runtime/src/z_Linux_util.cpp openmp/runtime/src/z_Linux_util.cpp >+index 5cd6ad6a0339..f6cad7b5320a 100644 >+--- openmp/runtime/src/z_Linux_util.cpp >++++ openmp/runtime/src/z_Linux_util.cpp >+@@ -987,7 +987,7 @@ void __kmp_exit_thread(int exit_status) { >+ #if KMP_USE_MONITOR >+ void __kmp_resume_monitor(); >+ >+-void __kmp_reap_monitor(kmp_info_t *th) { >++extern "C" void __kmp_reap_monitor(kmp_info_t *th) { >+ int status; >+ void *exit_val; >+ >+@@ -1029,6 +1029,12 @@ void __kmp_reap_monitor(kmp_info_t *th) { >+ >+ KMP_MB(); /* Flush all pending memory write invalidates. */ >+ } >++#else >++// Empty symbol to export (see exports_so.txt) when >++// monitor thread feature is disabled >++extern "C" void __kmp_reap_monitor(kmp_info_t *th) { >++ (void)th; >++} >+ #endif // KMP_USE_MONITOR >+ >+ void __kmp_reap_worker(kmp_info_t *th) { >diff --git a/lang/julia/files/patch-Make.inc b/lang/julia/files/patch-Make.inc >index 0eec09c344..d9c0231de3 100644 >--- a/lang/julia/files/patch-Make.inc >+++ b/lang/julia/files/patch-Make.inc >@@ -1,4 +1,4 @@ >---- Make.inc.orig 2023-08-24 16:20:21 UTC >+--- Make.inc.orig 2023-11-14 16:57:00 UTC > +++ Make.inc > @@ -268,7 +268,7 @@ docdir := $(datarootdir)/doc/julia > libexecdir := $(prefix)/libexec >@@ -52,7 +52,16 @@ > ifneq ($(CC_BASE)$(CXX_BASE),$(shell echo $(CC) | cut -d' ' -f1)$(shell echo $(CXX) | cut -d' ' -f1)) > $(error Forgot override directive on CC or CXX in Make.user? Cowardly refusing to build) > endif >-@@ -1295,14 +1268,8 @@ JLDFLAGS += -Wl,-Bdynamic >+@@ -1278,7 +1251,7 @@ JLDFLAGS += -Wl,-Bdynamic >+ JCPPFLAGS += -DJULIA_HAS_IFUNC_SUPPORT=1 >+ endif >+ JLDFLAGS += -Wl,-Bdynamic >+-OSLIBS += -Wl,--version-script=$(JULIAHOME)/src/julia.expmap >++OSLIBS = -Wl,--version-script=$(JULIAHOME)/src/julia.expmap >+ ifneq ($(SANITIZE),1) >+ JLDFLAGS += -Wl,-no-undefined >+ endif >+@@ -1295,16 +1268,12 @@ JLDFLAGS += -Wl,-Bdynamic > > ifeq ($(OS), FreeBSD) > JLDFLAGS += -Wl,-Bdynamic >@@ -65,10 +74,16 @@ > -# See #21788 > -OSLIBS += -lgcc_s > - >- OSLIBS += -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \ >- $(NO_WHOLE_ARCHIVE) >+-OSLIBS += -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \ >+- $(NO_WHOLE_ARCHIVE) >++JLIBVERFLAGS = -Wl,--version-script=$(JULIAHOME)/src/julialib.expmap >++JCGVERFLAGS = -Wl,--version-script=$(JULIAHOME)/src/juliacg.expmap >++JEXEVERFLAGS = -Wl,--version-script=$(JULIAHOME)/src/flisp/juliaexe.expmap >++OSLIBS += -Wl,--export-dynamic $(NO_WHOLE_ARCHIVE) > endif >-@@ -1511,30 +1478,6 @@ LIBJULIACODEGEN_DEBUG_INSTALL_DEPLIB := $(call dep_lib >+ >+ ifeq ($(OS), Darwin) >+@@ -1511,30 +1480,6 @@ LIBJULIACODEGEN_DEBUG_INSTALL_DEPLIB := $(call dep_lib > LIBJULIACODEGEN_DEBUG_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT)) > LIBJULIACODEGEN_DEBUG_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$(private_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT)) > >@@ -99,7 +114,7 @@ > # USE_SYSTEM_CSL causes it to get symlinked into build_private_shlibdir > ifeq ($(USE_SYSTEM_CSL),1) > LIBGCC_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_private_shlibdir)/$(LIBGCC_NAME)) >-@@ -1567,7 +1510,6 @@ LIBM_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$ >+@@ -1567,7 +1512,6 @@ LIBM_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$ > LIBM_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$(private_shlibdir)/$(LIBMNAME).$(SHLIB_EXT)) > > # We list: >@@ -107,7 +122,7 @@ > # * libopenlibm, because Windows has an untrustworthy libm, and we want to use ours more than theirs > # * libstdc++, because while performing `libstdc++` probing we need to > # know the path to the bundled `libstdc++` library. >-@@ -1589,7 +1531,6 @@ LOADER_BUILD_DEP_LIBS = $(call build_deplibs, \ >+@@ -1589,7 +1533,6 @@ LOADER_BUILD_DEP_LIBS = $(call build_deplibs, \ > endef > > LOADER_BUILD_DEP_LIBS = $(call build_deplibs, \ >@@ -115,7 +130,7 @@ > $(LIBM_BUILD_DEPLIB) \ > @$(LIBSTDCXX_BUILD_DEPLIB) \ > @$(LIBJULIAINTERNAL_BUILD_DEPLIB) \ >-@@ -1597,7 +1538,6 @@ LOADER_DEBUG_BUILD_DEP_LIBS = $(call build_deplibs, \ >+@@ -1597,7 +1540,6 @@ LOADER_DEBUG_BUILD_DEP_LIBS = $(call build_deplibs, \ > ) > > LOADER_DEBUG_BUILD_DEP_LIBS = $(call build_deplibs, \ >@@ -123,7 +138,7 @@ > $(LIBM_BUILD_DEPLIB) \ > @$(LIBSTDCXX_BUILD_DEPLIB) \ > @$(LIBJULIAINTERNAL_DEBUG_BUILD_DEPLIB) \ >-@@ -1605,14 +1545,12 @@ LOADER_INSTALL_DEP_LIBS = $(call build_deplibs, \ >+@@ -1605,14 +1547,12 @@ LOADER_INSTALL_DEP_LIBS = $(call build_deplibs, \ > ) > > LOADER_INSTALL_DEP_LIBS = $(call build_deplibs, \ >diff --git a/lang/julia/files/patch-deps_llvm.mk b/lang/julia/files/patch-deps_llvm.mk >new file mode 100644 >index 0000000000..e1e097d3cb >--- /dev/null >+++ b/lang/julia/files/patch-deps_llvm.mk >@@ -0,0 +1,45 @@ >+--- deps/llvm.mk.orig 2023-12-03 21:24:39 UTC >++++ deps/llvm.mk >+@@ -60,7 +60,10 @@ endif >+ LLVM_ENABLE_PROJECTS := $(LLVM_ENABLE_PROJECTS);lld >+ endif >+ >++LLVM_BUILD_BENCHMARKS?=1 >++LLVM_INCLUDE_BENCHMARKS?=1 >+ >++ >+ LLVM_LIB_FILE := libLLVMCodeGen.a >+ >+ # Figure out which targets to build >+@@ -76,6 +79,8 @@ LLVM_CMAKE += -DLLVM_ENABLE_RUNTIMES="$(LLVM_ENABLE_RU >+ LLVM_CMAKE += -DLLVM_ENABLE_PROJECTS="$(LLVM_ENABLE_PROJECTS)" >+ LLVM_CMAKE += -DLLVM_EXTERNAL_PROJECTS="$(LLVM_EXTERNAL_PROJECTS)" >+ LLVM_CMAKE += -DLLVM_ENABLE_RUNTIMES="$(LLVM_ENABLE_RUNTIMES)" >++LLVM_CMAKE += -DLLVM_ENABLE_BENCHMARKS="$(LLVM_ENABLE_BENCHMARKS)" >++LLVM_CMAKE += -DLLVM_INCLUDE_BENCHMARKS="$(LLVM_INCLUDE_BENCHMARKS)" >+ >+ ifeq ($(USE_RV),1) >+ LLVM_CMAKE += -DLLVM_EXTERNAL_RV_SOURCE_DIR=$(LLVM_MONOSRC_DIR)/rv >+@@ -90,6 +95,9 @@ LLVM_LDFLAGS += $(LDFLAGS) >+ LLVM_CXXFLAGS += $(CXXFLAGS) >+ LLVM_CPPFLAGS += $(CPPFLAGS) >+ LLVM_LDFLAGS += $(LDFLAGS) >++LLVM_CFLAGS += -I$(SRCCACHE)/$(LLVM_SRC_DIR)/third-party/benchmark/include >++LLVM_LDFLAGS += -L$(LLVM_BUILDDIR_withtype)/lib >++LLVM_CPPFLAGS += -I$(SRCCACHE)/$(LLVM_SRC_DIR)/third-party/benchmark/include >+ LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)" >+ LLVM_CMAKE += -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD:STRING="$(LLVM_EXPERIMENTAL_TARGETS)" >+ LLVM_CMAKE += -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))" >+@@ -231,6 +239,12 @@ $(eval $(call LLVM_PATCH,llvm-ittapi-cmake)) >+ endef >+ >+ $(eval $(call LLVM_PATCH,llvm-ittapi-cmake)) >++ >++$(SRCCACHE)/$(LLVM_SRC_DIR)/verfix.patch-applied: $(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted $(LLVM_PATCH_VERSIONFIXES) >++ cd $(SRCCACHE)/$(LLVM_SRC_DIR) && patch < $(LLVM_PATCH_VERSIONFIXES) >++ echo 1 > $@ >++ >++$(LLVM_BUILDDIR_withtype)/build-configured: | $(SRCCACHE)/$(LLVM_SRC_DIR)/verfix.patch-applied >+ >+ ifeq ($(USE_SYSTEM_ZLIB), 0) >+ $(LLVM_BUILDDIR_withtype)/build-configured: | $(build_prefix)/manifest/zlib >diff --git a/lang/julia/files/patch-src_Makefile b/lang/julia/files/patch-src_Makefile >new file mode 100644 >index 0000000000..6ab152ba02 >--- /dev/null >+++ b/lang/julia/files/patch-src_Makefile >@@ -0,0 +1,77 @@ >+--- src/Makefile.orig 2023-11-14 16:57:00 UTC >++++ src/Makefile >+@@ -363,15 +363,40 @@ CXXLD = $(CXX) -shared >+ >+ CXXLD = $(CXX) -shared >+ >+-$(build_shlibdir)/libjulia-internal.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a $(LIBUV) >++$(BUILDDIR)/julialib.expmap $(BUILDDIR)/juliacg.expmap: $(SRCDIR)/julia.expmap >++ sed <'$<' >$(BUILDDIR)/julialib.expmap \ >++ -e "/environ;/d" -e "/__progname;/d" \ >++ -e "/__stack_chk_guard;/d" -e "/asprintf;/d" \ >++ -e "/small_arraylist_grow;/d" -e "/rec_backtrace;/d" \ >++ -e "/libsupport_init;/d" -e "/localtime_r;/d" \ >++ -e "/restore_arg_area_loc;/d" -e "/restore_signals;/d" \ >++ -e "/rl_clear_input;/d" -e "/save_arg_area_loc;/d" \ >++ -e "/add_library_mapping;/d" -e "/_IO_stdin_used;/d" \ >++ -e "/llvmGetPassPluginInfo;/d" >++ sed <'$<' >$(BUILDDIR)/juliacg.expmap \ >++ -e "/environ;/d" -e "/__progname;/d" \ >++ -e "/__stack_chk_guard;/d" -e "/asprintf;/d" \ >++ -e "/arraylist_grow;/d" -e "/small_arraylist_grow;/d" \ >++ -e "/rec_backtrace;/d" -e "/libsupport_init;/d" \ >++ -e "/localtime_r;/d" -e "/memhash;/d" -e "/memhash32;/d" \ >++ -e "/memhash32_seed;/d" -e "/memhash_seed;/d" \ >++ -e "/restore_arg_area_loc;/d" -e "/restore_signals;/d" \ >++ -e "/jlbacktrace;/d" -e "/jlbacktracet;/d" \ >++ -e "/rl_clear_input;/d" -e "/save_arg_area_loc;/d" \ >++ -e "/add_library_mapping;/d" -e "/_IO_stdin_used;/d" \ >++ -e "/N4llvm9StringRefEi;/d" -e "/llvmGetPassPluginInfo;/d" >++ >++$(build_shlibdir)/libjulia-internal.$(JL_MAJOR_MINOR_SHLIB_EXT): $(BUILDDIR)/julialib.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a $(LIBUV) >+ @$(call PRINT_LINK, $(CXXLD) $(call IMPLIB_FLAGS,$@) $(JCXXFLAGS) $(JL_CXXFLAGS) $(CXXLDFLAGS) $(SHIPFLAGS) $(OBJS) $(RPATH_LIB) -o $@ \ >+- $(JLDFLAGS) $(JLIBLDFLAGS) $(RT_RELEASE_LIBS) $(call SONAME_FLAGS,libjulia-internal.$(JL_MAJOR_SHLIB_EXT))) >++ $(JLDFLAGS) $(JLIBLDFLAGS) $(RT_RELEASE_LIBS) $(JLIBVERFLAGS) \ >++ $(call SONAME_FLAGS,libjulia-internal.$(JL_MAJOR_SHLIB_EXT))) >+ @$(INSTALL_NAME_CMD)libjulia-internal.$(SHLIB_EXT) $@ >+ $(DSYMUTIL) $@ >+ >+-$(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) >++$(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) >+ @$(call PRINT_LINK, $(CXXLD) $(call IMPLIB_FLAGS,$@) $(JCXXFLAGS) $(JL_CXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(DOBJS) $(RPATH_LIB) -o $@ \ >+- $(JLDFLAGS) $(JLIBLDFLAGS) $(RT_DEBUG_LIBS) $(call SONAME_FLAGS,libjulia-internal-debug.$(JL_MAJOR_SHLIB_EXT))) >++ $(JLDFLAGS) $(JLIBLDFLAGS) $(RT_DEBUG_LIBS) $(JLIBVERFLAGS) \ >++ $(call SONAME_FLAGS,libjulia-internal-debug.$(JL_MAJOR_SHLIB_EXT))) >+ @$(INSTALL_NAME_CMD)libjulia-internal-debug.$(SHLIB_EXT) $@ >+ $(DSYMUTIL) $@ >+ >+@@ -389,15 +414,17 @@ libjulia-internal-debug libjulia-internal-release: $(P >+ libjulia-internal-debug: $(build_shlibdir)/libjulia-internal-debug.$(JL_MAJOR_MINOR_SHLIB_EXT) >+ libjulia-internal-debug libjulia-internal-release: $(PUBLIC_HEADER_TARGETS) >+ >+-$(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) >++$(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) >+ @$(call PRINT_LINK, $(CXXLD) $(call IMPLIB_FLAGS,$@) $(JCXXFLAGS) $(JL_CXXFLAGS) $(CXXLDFLAGS) $(SHIPFLAGS) $(CODEGEN_OBJS) $(RPATH_LIB) -o $@ \ >+- $(JLDFLAGS) $(JLIBLDFLAGS) $(CG_RELEASE_LIBS) $(call SONAME_FLAGS,libjulia-codegen.$(JL_MAJOR_SHLIB_EXT))) >++ $(JLDFLAGS) $(JLIBLDFLAGS) $(CG_RELEASE_LIBS) $(JCGVERFLAGS) \ >++ $(call SONAME_FLAGS,libjulia-codegen.$(JL_MAJOR_SHLIB_EXT))) >+ @$(INSTALL_NAME_CMD)libjulia-codegen.$(SHLIB_EXT) $@ >+ $(DSYMUTIL) $@ >+ >+-$(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) >++$(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) >+ @$(call PRINT_LINK, $(CXXLD) $(call IMPLIB_FLAGS,$@) $(JCXXFLAGS) $(JL_CXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(CODEGEN_DOBJS) $(RPATH_LIB) -o $@ \ >+- $(JLDFLAGS) $(JLIBLDFLAGS) $(CG_DEBUG_LIBS) $(call SONAME_FLAGS,libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT))) >++ $(JLDFLAGS) $(JLIBLDFLAGS) $(CG_DEBUG_LIBS) $(JCGVERFLAGS) \ >++ $(call SONAME_FLAGS,libjulia-codegen-debug.$(JL_MAJOR_SHLIB_EXT))) >+ @$(INSTALL_NAME_CMD)libjulia-codegen-debug.$(SHLIB_EXT) $@ >+ $(DSYMUTIL) $@ >+ >+@@ -420,6 +447,7 @@ clean: >+ -rm -f $(BUILDDIR)/julia_flisp.boot $(BUILDDIR)/julia_flisp.boot.inc $(BUILDDIR)/jl_internal_funcs.inc >+ -rm -f $(BUILDDIR)/*.dbg.obj $(BUILDDIR)/*.o $(BUILDDIR)/*.dwo $(BUILDDIR)/*.$(SHLIB_EXT) $(BUILDDIR)/*.a $(BUILDDIR)/*.h.gen >+ -rm -f $(BUILDDIR)/julia_version.h >++ -rm -f $(BUILDDIR)/julialib.expmap $(BUILDDIR)/juliacg.exmap >+ >+ clean-flisp: >+ -$(MAKE) -C $(SRCDIR)/flisp clean BUILDDIR='$(abspath $(BUILDDIR)/flisp)' >diff --git a/lang/julia/files/patch-src_flisp_Makefile b/lang/julia/files/patch-src_flisp_Makefile >new file mode 100644 >index 0000000000..b0c169dcda >--- /dev/null >+++ b/lang/julia/files/patch-src_flisp_Makefile >@@ -0,0 +1,36 @@ >+--- src/flisp/Makefile.orig 2023-11-14 16:57:00 UTC >++++ src/flisp/Makefile >+@@ -95,12 +95,22 @@ CCLD := $(CC) >+ >+ CCLD := $(CC) >+ >+-$(BUILDDIR)/$(EXENAME)-debug$(EXE): $(DOBJS) $(LIBFILES_debug) $(BUILDDIR)/$(LIBTARGET)-debug.a $(BUILDDIR)/flmain.dbg.obj | $(BUILDDIR)/flisp.boot >+- @$(call PRINT_LINK, $(CCLD) $(DEBUGFLAGS) $(JLDFLAGS) $(DOBJS) $(BUILDDIR)/flmain.dbg.obj -o $@ $(BUILDDIR)/$(LIBTARGET)-debug.a $(LIBFILES_debug) $(LIBS) $(OSLIBS)) >++$(BUILDDIR)/juliaexe.expmap: $(JULIAHOME)/src/julia.expmap >++ sed <'$<' >'$@' \ >++ -e "/__stack_chk_guard;/d" -e "/asprintf;/d" \ >++ -e "/rec_backtrace;/d" -e "/localtime_r;/d" \ >++ -e "/restore_arg_area_loc;/d" -e "/restore_signals;/d" \ >++ -e "/rl_clear_input;/d" -e "/save_arg_area_loc;/d" \ >++ -e "/add_library_mapping;/d" -e "/jlbacktrace;/d" \ >++ -e "/jlbacktracet;/d" -e "/_IO_stdin_used;/d" \ >++ -e "/N4llvm9StringRefEi;/d" -e "/llvmGetPassPluginInfo;/d" >+ >+-$(BUILDDIR)/$(EXENAME)$(EXE): $(OBJS) $(LIBFILES_release) $(BUILDDIR)/$(LIBTARGET).a $(BUILDDIR)/flmain.o | $(BUILDDIR)/flisp.boot >+- @$(call PRINT_LINK, $(CCLD) $(SHIPFLAGS) $(JLDFLAGS) $(OBJS) $(BUILDDIR)/flmain.o -o $@ $(BUILDDIR)/$(LIBTARGET).a $(LIBFILES_release) $(LIBS) $(OSLIBS)) >++$(BUILDDIR)/$(EXENAME)-debug$(EXE): $(DOBJS) $(LIBFILES_debug) $(BUILDDIR)/$(LIBTARGET)-debug.a $(BUILDDIR)/flmain.dbg.obj $(BUILDDIR)/juliaexe.expmap | $(BUILDDIR)/flisp.boot >++ @$(call PRINT_LINK, $(CCLD) $(DEBUGFLAGS) $(JLDFLAGS) $(DOBJS) $(BUILDDIR)/flmain.dbg.obj -o $@ $(BUILDDIR)/$(LIBTARGET)-debug.a $(LIBFILES_debug) $(LIBS) $(OSLIBS) $(JEXEVERFLAGS)) >+ >++$(BUILDDIR)/$(EXENAME)$(EXE): $(OBJS) $(LIBFILES_release) $(BUILDDIR)/$(LIBTARGET).a $(BUILDDIR)/flmain.o $(BUILDDIR)/juliaexe.expmap | $(BUILDDIR)/flisp.boot >++ @$(call PRINT_LINK, $(CCLD) $(SHIPFLAGS) $(JLDFLAGS) $(OBJS) $(BUILDDIR)/flmain.o -o $@ $(BUILDDIR)/$(LIBTARGET).a $(LIBFILES_release) $(LIBS) $(OSLIBS) $(JEXEVERFLAGS)) >++ >+ $(BUILDDIR)/host/Makefile: >+ mkdir -p $(BUILDDIR)/host >+ @# add Makefiles to the build directories for convenience (pointing back to the source location of each) >+@@ -133,5 +143,6 @@ clean: >+ rm -f $(BUILDDIR)/$(EXENAME)$(EXE) >+ rm -f $(BUILDDIR)/$(EXENAME)-debug$(EXE) >+ rm -f $(BUILDDIR)/host/* >++ rm -f $(BUILDDIR)/*.expmap >+ >+ .PHONY: flisp-deps
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 277697
:
249163
| 249166