diff --git a/debian/patches/0001-llvm-cmake-resolve-symlinks-in-LLVMConfig.cmake.patch b/debian/patches/0001-llvm-cmake-resolve-symlinks-in-LLVMConfig.cmake.patch deleted file mode 100644 index b0dc8153..00000000 --- a/debian/patches/0001-llvm-cmake-resolve-symlinks-in-LLVMConfig.cmake.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d0d969074f6e0f975ad53d21e7ce6c7b40cf2957 Mon Sep 17 00:00:00 2001 -From: Peter Wu -Date: Fri, 4 May 2018 15:43:06 +0200 -Subject: [PATCH] [llvm] cmake: resolve symlinks in LLVMConfig.cmake - -Ensure that symlinks such as /usr/lib/llvm-X.Y/cmake (pointing to -lib/cmake/llvm) are resolved. This ensures that LLVM_INSTALL_PREFIX -becomes /usr/lib/llvm-X.Y instead of /usr. - -Partially addresses PR37128 ---- - cmake/modules/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415/llvm/cmake/modules/CMakeLists.txt -=================================================================== ---- llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415.orig/llvm/cmake/modules/CMakeLists.txt -+++ llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415/llvm/cmake/modules/CMakeLists.txt -@@ -101,10 +101,10 @@ file(COPY . - # Generate LLVMConfig.cmake for the install tree. - set(LLVM_CONFIG_CODE " - # Compute the installation prefix from this LLVMConfig.cmake file location. --get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)") -+get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" REALPATH)") - # Construct the proper number of get_filename_component(... PATH) - # calls to compute the installation prefix. --string(REGEX REPLACE "/" ";" _count "${LLVM_INSTALL_PACKAGE_DIR}") -+string(REGEX REPLACE "/" ";" _count "prefix/${LLVM_INSTALL_PACKAGE_DIR}") - foreach(p ${_count}) - set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE} - get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)") diff --git a/debian/patches/0001-tools-clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch b/debian/patches/0001-tools-clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch index d4cf166d..f8624cf3 100644 --- a/debian/patches/0001-tools-clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch +++ b/debian/patches/0001-tools-clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch @@ -12,20 +12,23 @@ Partially addresses PR37128 cmake/modules/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415/clang/cmake/modules/CMakeLists.txt +Index: llvm-toolchain-snapshot_14~++20220107111239+f38873537bf7/cmake/Modules/FindPrefixFromConfig.cmake =================================================================== ---- llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415.orig/clang/cmake/modules/CMakeLists.txt -+++ llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415/clang/cmake/modules/CMakeLists.txt -@@ -31,10 +31,10 @@ set(CLANG_CONFIG_LLVM_CMAKE_DIR) - # Generate ClangConfig.cmake for the install tree. - set(CLANG_CONFIG_CODE " - # Compute the installation prefix from this LLVMConfig.cmake file location. --get_filename_component(CLANG_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)") -+get_filename_component(CLANG_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" REALPATH)") - # Construct the proper number of get_filename_component(... PATH) - # calls to compute the installation prefix. --string(REGEX REPLACE "/" ";" _count "${CLANG_INSTALL_PACKAGE_DIR}") -+string(REGEX REPLACE "/" ";" _count "prefix/${CLANG_INSTALL_PACKAGE_DIR}") - foreach(p ${_count}) - set(CLANG_CONFIG_CODE "${CLANG_CONFIG_CODE} - get_filename_component(CLANG_INSTALL_PREFIX \"\${CLANG_INSTALL_PREFIX}\" PATH)") +--- llvm-toolchain-snapshot_14~++20220107111239+f38873537bf7.orig/cmake/Modules/FindPrefixFromConfig.cmake ++++ llvm-toolchain-snapshot_14~++20220107111239+f38873537bf7/cmake/Modules/FindPrefixFromConfig.cmake +@@ -28,10 +28,13 @@ + function(find_prefix_from_config out_var prefix_var path_to_leave) + set(config_code + "# Compute the installation prefix from this LLVMConfig.cmake file location." +- "get_filename_component(${prefix_var} \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)") ++ "get_filename_component(${prefix_var} \"\${CMAKE_CURRENT_LIST_FILE}\" REALPATH)") ++ ++ + # Construct the proper number of get_filename_component(... PATH) + # calls to compute the installation prefix. +- string(REGEX REPLACE "/" ";" _count "${path_to_leave}") ++ string(REGEX REPLACE "/" ";" _count "prefix/${path_to_leave}") ++ + foreach(p ${_count}) + list(APPEND config_code + "get_filename_component(${prefix_var} \"\${${prefix_var}}\" PATH)") diff --git a/debian/patches/series b/debian/patches/series index 068735c8..0a71efa7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -26,9 +26,6 @@ debug-jit-path.diff do-not-fail-on-unexpected-pass.diff disable-display-PASS-UNSUPPORTED-XFAIL.diff -# llvm-config -0001-llvm-cmake-resolve-symlinks-in-LLVMConfig.cmake.patch - # Lib names 0044-soname.diff lldb-soname.diff