Remove glibc workaround
This commit is contained in:
parent
a3be76e24e
commit
16b01acad9
14
.github/workflows/osrm-backend.yml
vendored
14
.github/workflows/osrm-backend.yml
vendored
@ -291,7 +291,6 @@ jobs:
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -303,7 +302,6 @@ jobs:
|
||||
BUILD_TYPE: Debug
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -315,7 +313,6 @@ jobs:
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -327,7 +324,6 @@ jobs:
|
||||
BUILD_TYPE: Debug
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -340,7 +336,6 @@ jobs:
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -352,7 +347,6 @@ jobs:
|
||||
BUILD_TYPE: Debug
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -376,7 +370,6 @@ jobs:
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -388,7 +381,6 @@ jobs:
|
||||
BUILD_TYPE: Debug
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -412,7 +404,6 @@ jobs:
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -424,7 +415,6 @@ jobs:
|
||||
BUILD_TYPE: Debug
|
||||
CCOMPILER: clang-6.0
|
||||
CXXCOMPILER: clang++-6.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_CONAN: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
@ -443,7 +433,6 @@ jobs:
|
||||
ENABLE_ASSERTIONS: ${{ matrix.ENABLE_ASSERTIONS }}
|
||||
ENABLE_CLANG_TIDY: ${{ matrix.ENABLE_CLANG_TIDY }}
|
||||
ENABLE_COVERAGE: ${{ matrix.ENABLE_COVERAGE }}
|
||||
ENABLE_GLIBC_WORKAROUND: ${{ matrix.ENABLE_GLIBC_WORKAROUND }}
|
||||
ENABLE_CONAN: ${{ matrix.ENABLE_CONAN }}
|
||||
ENABLE_SANITIZER: ${{ matrix.ENABLE_SANITIZER }}
|
||||
NODE_PACKAGE_TESTS_ONLY: ${{ matrix.NODE_PACKAGE_TESTS_ONLY }}
|
||||
@ -593,8 +582,7 @@ jobs:
|
||||
-DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \
|
||||
-DBUILD_TOOLS=${BUILD_TOOLS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=${ENABLE_GLIBC_WORKAROUND:-OFF}
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
||||
make --jobs=${JOBS}
|
||||
|
||||
if [[ "${NODE_PACKAGE_TESTS_ONLY}" != "ON" ]]; then
|
||||
|
||||
@ -34,7 +34,6 @@ option(ENABLE_LTO "Use LTO if available" OFF)
|
||||
option(ENABLE_FUZZING "Fuzz testing using LLVM's libFuzzer" OFF)
|
||||
option(ENABLE_GOLD_LINKER "Use GNU gold linker if available" ON)
|
||||
option(ENABLE_NODE_BINDINGS "Build NodeJs bindings" OFF)
|
||||
option(ENABLE_GLIBC_WORKAROUND "Workaround GLIBC symbol exports" OFF)
|
||||
option(ENABLE_CLANG_TIDY "Enables clang-tidy checks" OFF)
|
||||
|
||||
if (ENABLE_CLANG_TIDY)
|
||||
@ -849,10 +848,6 @@ add_custom_target(uninstall
|
||||
add_subdirectory(unit_tests)
|
||||
add_subdirectory(src/benchmarks)
|
||||
|
||||
if (ENABLE_GLIBC_WORKAROUND)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLIBC_WORKAROUND")
|
||||
endif()
|
||||
|
||||
if (ENABLE_NODE_BINDINGS)
|
||||
add_subdirectory(src/nodejs)
|
||||
endif()
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
#ifdef GLIBC_WORKAROUND
|
||||
#include <stdexcept>
|
||||
|
||||
// https://github.com/bitcoin/bitcoin/pull/4042
|
||||
// allows building against libstdc++-dev-4.9 while avoiding
|
||||
// GLIBCXX_3.4.20 dep
|
||||
// This is needed because libstdc++ itself uses this API - its not
|
||||
// just an issue of your code using it, ughhh
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
#pragma GCC diagnostic ignored "-W#warnings"
|
||||
// Note: only necessary on Linux
|
||||
#ifdef __linux__
|
||||
#define _ENABLE_GLIBC_WORKAROUND
|
||||
#warning building with workaround
|
||||
#else
|
||||
#warning not building with workaround
|
||||
#endif
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#ifdef _ENABLE_GLIBC_WORKAROUND
|
||||
namespace std
|
||||
{
|
||||
|
||||
void __throw_out_of_range_fmt(const char *, ...) __attribute__((__noreturn__));
|
||||
void __throw_out_of_range_fmt(const char *err, ...)
|
||||
{
|
||||
// Safe and over-simplified version. Ignore the format and print it as-is.
|
||||
__throw_out_of_range(err);
|
||||
}
|
||||
} // namespace std
|
||||
#endif // _ENABLE_GLIBC_WORKAROUND
|
||||
|
||||
#endif // GLIBC_WORKAROUND
|
||||
Loading…
Reference in New Issue
Block a user