commit: c814bc34f94ad79c6c91a63e413f00e5114bd0f5 Author: Itai Ferber <itai <AT> itaiferber <DOT> net> AuthorDate: Fri Mar 7 20:29:56 2025 +0000 Commit: Itai Ferber <itai <AT> itaiferber <DOT> net> CommitDate: Fri Mar 7 20:32:21 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c814bc34
dev-lang/swift: fix swift-5.10.1 linker error on compiling IndexStore Closes: https://bugs.gentoo.org/950708 Signed-off-by: Itai Ferber <itai <AT> itaiferber.net> .../swift-5.10.1-r3/clang-indexstore-exports.patch | 48 ++++++++++++++++++++++ dev-lang/swift/swift-5.10.1-r3.ebuild | 1 + 2 files changed, 49 insertions(+) diff --git a/dev-lang/swift/files/swift-5.10.1-r3/clang-indexstore-exports.patch b/dev-lang/swift/files/swift-5.10.1-r3/clang-indexstore-exports.patch new file mode 100644 index 000000000..e01c25e82 --- /dev/null +++ b/dev-lang/swift/files/swift-5.10.1-r3/clang-indexstore-exports.patch @@ -0,0 +1,48 @@ +# The following functions are all declared to be explicitly exported from +# IndexStore via IndexStore.exports, but their declarations and implementations +# are guarded by `#if INDEXSTORE_HAS_BLOCKS`, which is `0` on non-Darwin +# platforms. They're not used on non-Darwin platforms, so not exporting them +# avoids a linker failure. + +--- a/llvm-project/clang/tools/IndexStore/IndexStore.exports ++++ b/llvm-project/clang/tools/IndexStore/IndexStore.exports +@@ -10,9 +10,7 @@ + indexstore_store_dispose + indexstore_store_get_unit_modification_time + indexstore_store_get_unit_name_from_output_path +-indexstore_store_units_apply + indexstore_store_units_apply_f +-indexstore_store_set_unit_event_handler + indexstore_store_set_unit_event_handler_f + indexstore_store_start_unit_event_listening + indexstore_store_stop_unit_event_listening +@@ -33,19 +31,13 @@ + indexstore_occurrence_get_symbol + indexstore_occurrence_get_roles + indexstore_occurrence_get_line_col +-indexstore_occurrence_relations_apply + indexstore_occurrence_relations_apply_f + indexstore_record_reader_create + indexstore_record_reader_dispose +-indexstore_record_reader_search_symbols + indexstore_record_reader_search_symbols_f +-indexstore_record_reader_symbols_apply + indexstore_record_reader_symbols_apply_f +-indexstore_record_reader_occurrences_apply + indexstore_record_reader_occurrences_apply_f +-indexstore_record_reader_occurrences_in_line_range_apply + indexstore_record_reader_occurrences_in_line_range_apply_f +-indexstore_record_reader_occurrences_of_symbols_apply + indexstore_record_reader_occurrences_of_symbols_apply_f + indexstore_unit_dependency_get_kind + indexstore_unit_dependency_get_filepath +@@ -68,9 +60,7 @@ + indexstore_unit_reader_get_output_file + indexstore_unit_reader_get_sysroot_path + indexstore_unit_reader_get_target +-indexstore_unit_reader_dependencies_apply + indexstore_unit_reader_dependencies_apply_f +-indexstore_unit_reader_includes_apply + indexstore_unit_reader_includes_apply_f + indexstore_unit_reader_has_main_file + indexstore_unit_reader_is_debug_compilation diff --git a/dev-lang/swift/swift-5.10.1-r3.ebuild b/dev-lang/swift/swift-5.10.1-r3.ebuild index abe663e4e..3230c2316 100644 --- a/dev-lang/swift/swift-5.10.1-r3.ebuild +++ b/dev-lang/swift/swift-5.10.1-r3.ebuild @@ -52,6 +52,7 @@ SRC_URI=" PATCHES=( "${FILESDIR}/${PF}/backport-swift-75662.patch" "${FILESDIR}/${PF}/backtracing-noexecstack.patch" + "${FILESDIR}/${PF}/clang-indexstore-exports.patch" "${FILESDIR}/${PF}/disable-libdispatch-werror.patch" "${FILESDIR}/${PF}/link-ncurses-tinfo.patch" "${FILESDIR}/${PF}/link-with-lld.patch"
