From c39e93a38ef46e5df7b42165851a2e341f59cbd3 Mon Sep 17 00:00:00 2001 From: Erik Maciejewski Date: Fri, 5 Nov 2021 16:49:08 -0700 Subject: [PATCH] add option to disable compiler-rt scudo standalone patch compiler-rt build to add cmake option for disabling scudo standalone add COMPILER_RT_BUILD_SCUDO_STANDALONE=OFF to armel build since the baseline armv5t arch profile is not supported --- debian/changelog | 9 +++++++++ ...pilerrt-build-scudo-standalone-option.diff | 19 +++++++++++++++++++ debian/patches/series | 1 + debian/rules | 2 ++ 4 files changed, 31 insertions(+) create mode 100644 debian/patches/compilerrt-build-scudo-standalone-option.diff diff --git a/debian/changelog b/debian/changelog index abee814b..81856d3e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +llvm-toolchain-13 (1:13.0.0-10) unstable; urgency=medium + + * patch compiler-rt build to add option to disable scudo standalone allocator + as it is not always supported by all debian baseline arch profiles + * add COMPILER_RT_BUILD_SCUDO_STANDALONE=OFF to armel build in debian/rules + since the baseline armv5t arch profile is not supported + + -- Erik Maciejewski Fri, 05 Nov 2021 16:38:43 -0700 + llvm-toolchain-13 (1:13.0.0-9) unstable; urgency=medium * Merge migration to 2stage runtimes build 12 => 13 diff --git a/debian/patches/compilerrt-build-scudo-standalone-option.diff b/debian/patches/compilerrt-build-scudo-standalone-option.diff new file mode 100644 index 00000000..8f9059ed --- /dev/null +++ b/debian/patches/compilerrt-build-scudo-standalone-option.diff @@ -0,0 +1,19 @@ +add option to disable compiler-rt scudo standalone allocator as it is +not always supported by all arch profiles such as arm5vt of ARM32 arch +Index: llvm-toolchain-13_13.0.0/compiler-rt/CMakeLists.txt +=================================================================== +--- llvm-toolchain-13_13.0.0.orig/compiler-rt/CMakeLists.txt ++++ llvm-toolchain-13_13.0.0/compiler-rt/CMakeLists.txt +@@ -250,6 +250,12 @@ option(COMPILER_RT_USE_BUILTINS_LIBRARY + + include(config-ix) + ++option(COMPILER_RT_BUILD_SCUDO_STANDALONE ++ "override whether or not to build scudo standalone" ON) ++if(NOT COMPILER_RT_BUILD_SCUDO_STANDALONE) ++ set(COMPILER_RT_HAS_SCUDO_STANDALONE FALSE) ++endif() ++ + #================================ + # Setup Compiler Flags + #================================ diff --git a/debian/patches/series b/debian/patches/series index 4a619575..d509154a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -149,3 +149,4 @@ libcxx-libatomic-only-with-gcc-rtlib.diff libcxxabi-fix-link-builtins.diff llvm-runtimes-builtins-build-check.diff compilerrt-builtins-arch-fix-armhf.diff +compilerrt-build-scudo-standalone-option.diff diff --git a/debian/rules b/debian/rules index 22f5dda2..61195d17 100755 --- a/debian/rules +++ b/debian/rules @@ -141,6 +141,8 @@ ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) STAGE_ALL_CMAKE_EXTRA += -DCOMPILER_RT_BUILD_BUILTINS=OFF COMPILER_RT_USE_BUILTINS_LIBRARY := OFF LIBCXX_USE_COMPILER_RT := OFF +# disable scudo standalone (not supported for baseline armel arch: armv5t) + STAGE_ALL_CMAKE_EXTRA += -DCOMPILER_RT_BUILD_SCUDO_STANDALONE=OFF endif ifneq (,$(findstring $(DEB_HOST_ARCH),armhf))