summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-08-18 12:07:55 +0200
committerTor Egge <Tor.Egge@broadpark.no>2020-08-18 12:07:55 +0200
commit38f5a0ba1768469f848eb88b8d634e40e6e63dbb (patch)
treec026eda2ae362af82e74a7e0d9f943c876133428
parentad498f69b572fb53d26424cb03ad45589acfc17f (diff)
Port to Debian 10.
-rw-r--r--build_settings.cmake8
-rw-r--r--default_build_settings.cmake7
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/testkit/test_master.hpp9
4 files changed, 25 insertions, 1 deletions
diff --git a/build_settings.cmake b/build_settings.cmake
index d7dd26f5ee7..6f6df3de883 100644
--- a/build_settings.cmake
+++ b/build_settings.cmake
@@ -66,8 +66,14 @@ else()
set(VESPA_STDCXX_FS_LIB "stdc++fs")
endif()
+if(VESPA_OS_DISTRO_COMBINED STREQUAL "debian 10")
+ set(VESPA_XXHASH_DEFINE "-DXXH_NO_INLINE_ALL")
+else()
+ set(VESPA_XXHASH_DEFINE "-DXXH_INLINE_ALL")
+endif()
+
# C and C++ compiler flags
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} -DXXH_INLINE_ALL -DBOOST_DISABLE_ASSERTS ${VESPA_CPU_ARCH_FLAGS} ${EXTRA_C_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} ${VESPA_XXHASH_DEFINE} -DBOOST_DISABLE_ASSERTS ${VESPA_CPU_ARCH_FLAGS} ${EXTRA_C_FLAGS}")
# AddressSanitizer/ThreadSanitizer work for both GCC and Clang
if (VESPA_USE_SANITIZER)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${VESPA_USE_SANITIZER}")
diff --git a/default_build_settings.cmake b/default_build_settings.cmake
index 69a69dc1860..07a70c38d71 100644
--- a/default_build_settings.cmake
+++ b/default_build_settings.cmake
@@ -96,6 +96,11 @@ function(setup_vespa_default_build_settings_ubuntu_20_04)
set(DEFAULT_VESPA_LLVM_VERSION "10" PARENT_SCOPE)
endfunction()
+function(setup_vespa_default_build_settings_debian_10)
+ message("-- Setting up default build settings for debian 10")
+ set(DEFAULT_VESPA_LLVM_VERSION "7" PARENT_SCOPE)
+endfunction()
+
function(vespa_use_default_vespa_unprivileged)
if(NOT DEFINED VESPA_UNPRIVILEGED)
message("-- Setting VESPA_UNPRIVILEGED to yes")
@@ -185,6 +190,8 @@ function(vespa_use_default_build_settings)
setup_vespa_default_build_settings_ubuntu_19_10()
elseif(VESPA_OS_DISTRO_COMBINED STREQUAL "ubuntu 20.04")
setup_vespa_default_build_settings_ubuntu_20_04()
+ elseif(VESPA_OS_DISTRO_COMBINED STREQUAL "debian 10")
+ setup_vespa_default_build_settings_debian_10()
else()
message(FATAL_ERROR "-- Unkonwn vespa build platform ${VESPA_OS_DISTRO_COMBINED}")
endif()
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index f536def28a0..a711b29f7a4 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -14,9 +14,11 @@
#include <vespa/storageapi/message/stat.h>
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <vespa/vespalib/util/exceptions.h>
+#ifndef XXH_NO_INLINE_ALL
#ifndef XXH_INLINE_ALL
# define XXH_INLINE_ALL // Let XXH64 be inlined for fixed hash size (bucket ID)
#endif
+#endif
#include <xxhash.h>
#include <vespa/log/log.h>
diff --git a/vespalib/src/vespa/vespalib/testkit/test_master.hpp b/vespalib/src/vespa/vespalib/testkit/test_master.hpp
index fc163c8d14e..8a5f7eb337b 100644
--- a/vespalib/src/vespa/vespalib/testkit/test_master.hpp
+++ b/vespalib/src/vespa/vespalib/testkit/test_master.hpp
@@ -4,6 +4,15 @@
namespace vespalib {
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 9
+// cf. https://cplusplus.github.io/LWG/issue2221
+template<class charT, class traits>
+std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& os, nullptr_t)
+{
+ return os << (void*) nullptr;
+}
+#endif
+
template<class A, class B, class OP>
bool
TestMaster::compare(const char *file, uint32_t line,