From fa2ba639d5d2d638aee848ecc751b3b36279dcaf Mon Sep 17 00:00:00 2001 From: Anton Gladky Date: Thu, 14 Jan 2021 23:41:12 +0100 Subject: [PATCH] Use CXX for mimalloc compilation --- debian/patches/30_use_cxx_for_mimalloc.patch | 15 +++++++++ debian/patches/fix_armel_compilation.patch | 33 -------------------- debian/patches/series | 2 +- 3 files changed, 16 insertions(+), 34 deletions(-) create mode 100644 debian/patches/30_use_cxx_for_mimalloc.patch delete mode 100644 debian/patches/fix_armel_compilation.patch diff --git a/debian/patches/30_use_cxx_for_mimalloc.patch b/debian/patches/30_use_cxx_for_mimalloc.patch new file mode 100644 index 0000000..35c9242 --- /dev/null +++ b/debian/patches/30_use_cxx_for_mimalloc.patch @@ -0,0 +1,15 @@ +Description: Use CXX for mimalloc. Fixes FTBFS on arm +Author: Anton Gladky +Last-Update: 2021-01-14 + +--- solvespace-3.0.rc1+repack1.orig/extlib/mimalloc/CMakeLists.txt ++++ solvespace-3.0.rc1+repack1/extlib/mimalloc/CMakeLists.txt +@@ -10,7 +10,7 @@ option(MI_PADDING "Enable padd + option(MI_OVERRIDE "Override the standard malloc interface (e.g. define entry points for malloc() etc)" ON) + option(MI_XMALLOC "Enable abort() call on memory allocation failure by default" OFF) + option(MI_SHOW_ERRORS "Show error and warning messages by default (only enabled by default in DEBUG mode)" OFF) +-option(MI_USE_CXX "Use the C++ compiler to compile the library (instead of the C compiler)" OFF) ++option(MI_USE_CXX "Use the C++ compiler to compile the library (instead of the C compiler)" ON) + option(MI_SEE_ASM "Generate assembly files" OFF) + option(MI_INTERPOSE "Use interpose to override standard malloc on macOS" ON) + option(MI_OSX_ZONE "Use malloc zone to override standard malloc on macOS" OFF) # enables interpose as well diff --git a/debian/patches/fix_armel_compilation.patch b/debian/patches/fix_armel_compilation.patch deleted file mode 100644 index 5cb0296..0000000 --- a/debian/patches/fix_armel_compilation.patch +++ /dev/null @@ -1,33 +0,0 @@ -Description: Fix compilation on armel - use mnemonic 'yield' only for ARMv7 onwards -Author: Anton Gladky -Origin: https://github.com/boostorg/fiber/commit/388f52e9a07961c6cd331bcc38221d5a6599f030 -Last-Update: 2021-01-14 - ---- solvespace-3.0.rc1+repack1.orig/extlib/mimalloc/include/mimalloc-atomic.h -+++ solvespace-3.0.rc1+repack1/extlib/mimalloc/include/mimalloc-atomic.h -@@ -272,6 +272,24 @@ static inline void mi_atomic_maxi64(vola - static inline void mi_atomic_yield(void) { - asm volatile ("pause" ::: "memory"); - } -+#elif (defined(__ARM_ARCH_2__) || \ -+ defined(__ARM_ARCH_3__) || \ -+ defined(__ARM_ARCH_3M__) || \ -+ defined(__ARM_ARCH_4T__) || \ -+ defined(__TARGET_ARM_4T) || \ -+ defined(__ARM_ARCH_5__) || \ -+ defined(__ARM_ARCH_5E__) || \ -+ defined(__ARM_ARCH_5T__) || \ -+ defined(__ARM_ARCH_5TE__) || \ -+ defined(__ARM_ARCH_5TEJ__) || \ -+ defined(__ARM_ARCH_6__) || \ -+ defined(__ARM_ARCH_6J__) || \ -+ defined(__ARM_ARCH_6K__) || \ -+ defined(__ARM_ARCH_6Z__) || \ -+ defined(__ARM_ARCH_6ZK__) || \ -+ defined(__ARM_ARCH_6T2__)) \ -+# warning "architecture does not support yield/pause mnemonic" -+ std::this_thread::yield(); - #elif defined(__arm__) || defined(__aarch64__) - static inline void mi_atomic_yield(void) { - asm volatile("yield"); diff --git a/debian/patches/series b/debian/patches/series index 19a0d06..9a588ad 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,3 @@ 01_RemoveGitHash.patch 20_use_system_flatbuffers.patch -fix_armel_compilation.patch +30_use_cxx_for_mimalloc.patch -- 2.30.2