From 69ac5b7c8c23890b607a5e5d2a0d0bb3bf33c194 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Thu, 7 Mar 2024 16:57:48 +0100 Subject: [PATCH] * Fix sanitizer build on 32bit time_t64 architectures. --- debian/changelog | 3 ++- debian/patches/libsanitizer-timebits.diff | 22 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 debian/patches/libsanitizer-timebits.diff diff --git a/debian/changelog b/debian/changelog index 92b8bff3..f84ded1f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,9 @@ llvm-toolchain-17 (1:17.0.6-8) UNRELEASED; urgency=medium [ Matthias Klose ] * Make libclang-common-18-dev architecture dependent, mark profile and xray include files as optional on armel and armhf. + * Fix sanitizer build on 32bit time_t64 architectures. - -- Zixing Liu Wed, 06 Mar 2024 17:27:22 -0700 + -- Matthias Klose Thu, 07 Mar 2024 16:56:50 +0100 llvm-toolchain-17 (1:17.0.6-7) unstable; urgency=medium diff --git a/debian/patches/libsanitizer-timebits.diff b/debian/patches/libsanitizer-timebits.diff new file mode 100644 index 00000000..f5ee919a --- /dev/null +++ b/debian/patches/libsanitizer-timebits.diff @@ -0,0 +1,22 @@ +# DP: Add another #undef for _TIME_BITS + +--- a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp +@@ -11,6 +11,7 @@ + + // Before Solaris 11.4, doesn't work in a largefile environment. + #undef _FILE_OFFSET_BITS ++#undef _TIME_BITS + #include "sanitizer_platform.h" + #if SANITIZER_SOLARIS + # include +#--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +#+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +#@@ -18,6 +18,7 @@ +# // depends on _FILE_OFFSET_BITS setting. +# // To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below. +# #undef _FILE_OFFSET_BITS +#+#undef _TIME_BITS +# #endif +# +# // Must go after undef _FILE_OFFSET_BITS. diff --git a/debian/patches/series b/debian/patches/series index 218d718c..b800747c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -154,3 +154,4 @@ libclang-major-version-only.diff D148945-revert.diff arm32-defaults.diff mips/D154390-pre-R6.diff +libsanitizer-timebits.diff