diff --git a/debian/patches/compilerrt-builtins-arch-fix-armhf.diff b/debian/patches/compilerrt-builtins-arch-fix-armhf.diff index d762b29c..7d6f02d9 100644 --- a/debian/patches/compilerrt-builtins-arch-fix-armhf.diff +++ b/debian/patches/compilerrt-builtins-arch-fix-armhf.diff @@ -1,10 +1,10 @@ fix builtins armhf default arch detection by adding the same armhf triple handling use for compiler-rt -Index: llvm-toolchain-12_12.0.1/compiler-rt/lib/builtins/CMakeLists.txt +Index: llvm-toolchain-13-13.0.1~+rc1/compiler-rt/lib/builtins/CMakeLists.txt =================================================================== ---- llvm-toolchain-12_12.0.1.orig/compiler-rt/lib/builtins/CMakeLists.txt -+++ llvm-toolchain-12_12.0.1/compiler-rt/lib/builtins/CMakeLists.txt -@@ -16,6 +16,11 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR +--- llvm-toolchain-13-13.0.1~+rc1.orig/compiler-rt/lib/builtins/CMakeLists.txt ++++ llvm-toolchain-13-13.0.1~+rc1/compiler-rt/lib/builtins/CMakeLists.txt +@@ -17,6 +17,11 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR load_llvm_config() construct_compiler_rt_default_triple() diff --git a/debian/patches/libcxxabi-fix-link-builtins.diff b/debian/patches/libcxxabi-fix-link-builtins.diff index 7a71c4f1..5d458ee8 100644 --- a/debian/patches/libcxxabi-fix-link-builtins.diff +++ b/debian/patches/libcxxabi-fix-link-builtins.diff @@ -1,16 +1,17 @@ if LIBCXXABI_USE_COMPILER_RT=ON, add builtins to libcxxabi library flags, otherwise add libgcc following how libunwind does the same -Index: llvm-toolchain-12_12.0.1/libcxxabi/src/CMakeLists.txt +Index: llvm-toolchain-13-13.0.1~+rc1/libcxxabi/src/CMakeLists.txt =================================================================== ---- llvm-toolchain-12_12.0.1.orig/libcxxabi/src/CMakeLists.txt -+++ llvm-toolchain-12_12.0.1/libcxxabi/src/CMakeLists.txt -@@ -104,7 +104,9 @@ if (ANDROID AND ANDROID_PLATFORM_LEVEL L +--- llvm-toolchain-13-13.0.1~+rc1.orig/libcxxabi/src/CMakeLists.txt ++++ llvm-toolchain-13-13.0.1~+rc1/libcxxabi/src/CMakeLists.txt +@@ -111,7 +111,9 @@ if (ANDROID AND ANDROID_PLATFORM_LEVEL L list(APPEND LIBCXXABI_LIBRARIES android_support) endif() - + -if (NOT LIBCXXABI_USE_COMPILER_RT) +if (LIBCXXABI_USE_COMPILER_RT) + add_library_flags("${LIBCXXABI_BUILTINS_LIBRARY}") +else() add_library_flags_if(LIBCXXABI_HAS_GCC_LIB gcc) endif () + diff --git a/debian/patches/llvm-runtimes-builtins-build-check.diff b/debian/patches/llvm-runtimes-builtins-build-check.diff index b4f7eab9..d9c7d7e9 100644 --- a/debian/patches/llvm-runtimes-builtins-build-check.diff +++ b/debian/patches/llvm-runtimes-builtins-build-check.diff @@ -1,10 +1,10 @@ add a check and only set up and build compiler-rt builtins if they have not been disabled -Index: llvm-toolchain-12_12.0.1/llvm/runtimes/CMakeLists.txt +Index: llvm-toolchain-13-13.0.1~+rc1/llvm/runtimes/CMakeLists.txt =================================================================== ---- llvm-toolchain-12_12.0.1.orig/llvm/runtimes/CMakeLists.txt -+++ llvm-toolchain-12_12.0.1/llvm/runtimes/CMakeLists.txt -@@ -131,7 +131,12 @@ endfunction() +--- llvm-toolchain-13-13.0.1~+rc1.orig/llvm/runtimes/CMakeLists.txt ++++ llvm-toolchain-13-13.0.1~+rc1/llvm/runtimes/CMakeLists.txt +@@ -129,7 +129,12 @@ endfunction() # is required because the other runtimes need the builtin libraries present # before the just-built compiler can pass the configuration tests. get_compiler_rt_path(compiler_rt_path) diff --git a/debian/patches/use-gold-for-compiler-rt-when-set.diff b/debian/patches/use-gold-for-compiler-rt-when-set.diff index 1e25479a..cb9537e0 100644 --- a/debian/patches/use-gold-for-compiler-rt-when-set.diff +++ b/debian/patches/use-gold-for-compiler-rt-when-set.diff @@ -1,8 +1,9 @@ -diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt ---- a/llvm/runtimes/CMakeLists.txt -+++ b/llvm/runtimes/CMakeLists.txt -@@ -242,6 +242,8 @@ - ${COMMON_CMAKE_ARGS} +Index: llvm-toolchain-13-13.0.1~+rc1/llvm/runtimes/CMakeLists.txt +=================================================================== +--- llvm-toolchain-13-13.0.1~+rc1.orig/llvm/runtimes/CMakeLists.txt ++++ llvm-toolchain-13-13.0.1~+rc1/llvm/runtimes/CMakeLists.txt +@@ -244,6 +244,8 @@ function(runtime_default_target) + -DCMAKE_ASM_COMPILER_WORKS=ON ${RUNTIMES_CMAKE_ARGS} PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES + LLVM_USE_LLD @@ -10,13 +11,12 @@ diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt ${ARG_PREFIXES} EXTRA_TARGETS ${extra_targets} ${test_targets} -@@ -345,6 +347,8 @@ +@@ -345,6 +347,8 @@ function(runtime_register_target name ta + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -DLLVM_RUNTIMES_TARGET=${name} - ${COMMON_CMAKE_ARGS} ${${name}_extra_args} + PASSTHROUGH_PREFIXES LLVM_USE_LLD + LLVM_USE_LINKER EXTRA_TARGETS ${${name}_extra_targets} ${${name}_test_targets} USE_TOOLCHAIN -