summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-08-18 13:40:58 +0200
committerGitHub <noreply@github.com>2020-08-18 13:40:58 +0200
commitae1ee22b8ecca06745a685c528f1fe053a7588e2 (patch)
treed49c0cd0d81113aad5893f352972afc7c946d178
parent0e35311cae670655c97db111268485beb21a17cc (diff)
parent299fc4a646961edec9658e641f14e83922f2d753 (diff)
Merge pull request #14082 from vespa-engine/toregge/port-to-debian-10
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.cpp3
-rw-r--r--vespalib/src/vespa/vespalib/testkit/test_master.hpp9
4 files changed, 23 insertions, 4 deletions
diff --git a/build_settings.cmake b/build_settings.cmake
index d7dd26f5ee7..1a05ffe5073 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")
+ unset(VESPA_XXHASH_DEFINE)
+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..4df2b5e591b 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -14,9 +14,6 @@
#include <vespa/storageapi/message/stat.h>
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <vespa/vespalib/util/exceptions.h>
-#ifndef XXH_INLINE_ALL
-# define XXH_INLINE_ALL // Let XXH64 be inlined for fixed hash size (bucket ID)
-#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,