Fix a FTBFS on armel with libcxx-armhf-ftbfs.diff atomic:2780:16: error: use of undeclared identifier '__libcpp_signed_lock_free' typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free; ^ atomic:2781:16: error: unknown type name '__libcpp_unsigned_lock_free'; did you mean 'atomic_signed_lock_free'? typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;

This commit is contained in:
Sylvestre Ledru 2020-08-27 19:11:27 +02:00
parent bcaea5c994
commit 14267ea863
3 changed files with 27 additions and 0 deletions

6
debian/changelog vendored
View File

@ -9,6 +9,12 @@ llvm-toolchain-11 (1:11.0.0~+rc2-2) unstable; urgency=medium
* Also link against -latomic on mipsel to fix * Also link against -latomic on mipsel to fix
/usr/[...]/atomic_base.h:426: undefined reference to `__atomic_load_8' /usr/[...]/atomic_base.h:426: undefined reference to `__atomic_load_8'
for lld to fix the FTBFS for lld to fix the FTBFS
* Fix a FTBFS on armel with libcxx-armhf-ftbfs.diff
atomic:2780:16: error: use of undeclared identifier '__libcpp_signed_lock_free'
typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free;
^
atomic:2781:16: error: unknown type name '__libcpp_unsigned_lock_free'; did you mean 'atomic_signed_lock_free'?
typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 25 Aug 2020 10:44:00 +0200 -- Sylvestre Ledru <sylvestre@debian.org> Tue, 25 Aug 2020 10:44:00 +0200

20
debian/patches/libcxx-armhf-ftbfs.diff vendored Normal file
View File

@ -0,0 +1,20 @@
Index: llvm-toolchain-11-11.0.0~+rc2/libcxx/include/atomic
===================================================================
--- llvm-toolchain-11-11.0.0~+rc2.orig/libcxx/include/atomic
+++ llvm-toolchain-11-11.0.0~+rc2/libcxx/include/atomic
@@ -2775,10 +2775,15 @@ typedef conditional<_LIBCPP_CONTENTION_L
typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>::type __libcpp_unsigned_lock_free;
#else
// No signed/unsigned lock-free types
+#define NO_LOCK_FREE
#endif
+#ifndef NO_LOCK_FREE
typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free;
typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
+#endif
+
+#undef NO_LOCK_FREE
#define ATOMIC_FLAG_INIT {false}
#define ATOMIC_VAR_INIT(__v) {__v}

View File

@ -136,3 +136,4 @@ disable-fuzzer-compiler-rt-x86.diff
python3-shebang.patch python3-shebang.patch
print-lldb-path.patch print-lldb-path.patch
libcxx-armhf-ftbfs.diff