head 1.3; access; symbols pkgsrc-2024Q2:1.2.0.20 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.18 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.16 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.14 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.12 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.10 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.8 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.6 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.4 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.2 pkgsrc-2022Q1-base:1.2; locks; strict; comment @# @; 1.3 date 2024.07.06.15.45.07; author adam; state dead; branches; next 1.2; commitid 9KpFpYTi5zNpfNgF; 1.2 date 2022.01.14.08.58.48; author tm; state Exp; branches; next 1.1; commitid LyorUfPNyPbg3AoD; 1.1 date 2022.01.11.17.27.39; author tm; state Exp; branches; next ; commitid 6hvpGVoku4iOXeoD; desc @@ 1.3 log @llvm: updated to 18.1.8 https://releases.llvm.org @ text @$NetBSD: patch-tools_libclang_CMakeLists.txt,v 1.2 2022/01/14 08:58:48 tm Exp $ Only the linker on Solaris 11.4 supports GNU ld version script and only if the special option gnu-version-script-compat is used. Older Solaris linker doesn't support version script. --- tools/libclang/CMakeLists.txt.orig 2021-09-24 16:18:10.000000000 +0000 +++ tools/libclang/CMakeLists.txt @@@@ -167,11 +167,21 @@@@ if(ENABLE_SHARED) endif() endif() if (USE_VERSION_SCRIPT) - target_link_options(libclang PRIVATE "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libclang.map") - # The Solaris 11.4 linker supports a subset of GNU ld version scripts, - # but requires a special option to enable it. if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") - target_link_options(libclang PRIVATE "-Wl,-z,gnu-version-script-compat") + include(CheckLinkerFlag) + # The Solaris 11.4 linker supports a subset of GNU ld version scripts, + # but requires a special option to enable it. + llvm_check_linker_flag(CXX "-Wl,-z,gnu-version-script-compat" LINKER_SUPPORTS_Z_GNU_VERSION_SCRIPT_COMPAT) + # Older Solaris (and illumos) linker doesn't support GNU ld version + # and doesn't support GNU version script compat. + if (LINKER_SUPPORTS_Z_GNU_VERSION_SCRIPT_COMPAT) + target_link_options(libclang PRIVATE "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libclang.map") + target_link_options(libclang PRIVATE "-Wl,-z,gnu-version-script-compat") + else() + target_link_options(libclang PRIVATE "-Wl,-M,${CMAKE_CURRENT_SOURCE_DIR}/libclang.map") + endif() + else() + target_link_options(libclang PRIVATE "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/libclang.map") endif() # Ensure that libclang.so gets rebuilt when the linker script changes. set_property(SOURCE ARCMigrate.cpp APPEND PROPERTY @ 1.2 log @clang: fix patch files for solaris by providing a missing newline Move file content to correct patch files based on the patch name. Add missing newline to the end of one patch file. @ text @d1 1 a1 1 $NetBSD: patch-tools_libclang_CMakeLists.txt,v 1.1 2022/01/11 17:27:39 tm Exp $ @ 1.1 log @clang: provide patches to build on illumos distributions Workaround features which are not available on old illumos (Solaris < 11.4) linker. @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 1 -B flag symbolic-functions is not supported on Solaris before 11.4 d7 28 a34 10 --- tools/clang-shlib/CMakeLists.txt.orig 2021-09-24 16:18:10.000000000 +0000 +++ tools/clang-shlib/CMakeLists.txt @@@@ -50,6 +50,6 @@@@ add_clang_library(clang-cpp ${_DEPS}) # Optimize function calls for default visibility definitions to avoid PLT and # reduce dynamic relocations. -if (NOT APPLE AND NOT MINGW) +if (NOT APPLE AND NOT MINGW AND NOT "SunOS" MATCHES ${CMAKE_SYSTEM_NAME}) target_link_options(clang-cpp PRIVATE LINKER:-Bsymbolic-functions) endif() @