mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-18 18:15:50 +00:00
Patch Boost to suppress warnings on clang
This commit is contained in:
@@ -17,6 +17,9 @@ before_install:
|
||||
mkdir -p $BOOST_ROOT/stage
|
||||
ln -s /usr/lib/x86_64-linux-gnu $BOOST_ROOT/stage/lib
|
||||
ln -s /usr/include/boost $BOOST_ROOT/boost
|
||||
- | # Try to patch boost
|
||||
sudo patch /usr/include/boost/bimap/detail/debug/static_error.hpp Builds/travis/static_error.boost.patch
|
||||
sudo patch /usr/include/boost/config/compiler/clang.hpp Builds/travis/clang.boost.patch
|
||||
- sudo apt-get install -qq mlocate
|
||||
- sudo updatedb
|
||||
- sudo locate libboost | grep /lib | grep -e ".a$"
|
||||
|
||||
13
Builds/travis/clang.boost.patch
Normal file
13
Builds/travis/clang.boost.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- /usr/include/boost/config/compiler/clang.hpp 2013-07-20 13:17:10.000000000 -0400
|
||||
+++ /usr/include/boost/config/compiler/clang.rippled.hpp 2014-03-11 16:40:51.000000000 -0400
|
||||
@@ -39,6 +39,10 @@
|
||||
// Clang supports "long long" in all compilation modes.
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
+#if defined(__SIZEOF_INT128__)
|
||||
+# define BOOST_HAS_INT128
|
||||
+#endif
|
||||
+
|
||||
//
|
||||
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
|
||||
//
|
||||
10
Builds/travis/static_error.boost.patch
Normal file
10
Builds/travis/static_error.boost.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- /usr/include/boost/bimap/detail/debug/static_error.hpp 2008-03-22 17:45:55.000000000 -0400
|
||||
+++ /usr/include/boost/bimap/detail/debug/static_error.rippled.hpp 2014-03-12 19:40:05.000000000 -0400
|
||||
@@ -25,7 +25,6 @@
|
||||
// a static error.
|
||||
/*===========================================================================*/
|
||||
#define BOOST_BIMAP_STATIC_ERROR(MESSAGE,VARIABLES) \
|
||||
- struct BOOST_PP_CAT(BIMAP_STATIC_ERROR__,MESSAGE) {}; \
|
||||
BOOST_MPL_ASSERT_MSG(false, \
|
||||
BOOST_PP_CAT(BIMAP_STATIC_ERROR__,MESSAGE), \
|
||||
VARIABLES)
|
||||
13
SConstruct
13
SConstruct
@@ -246,11 +246,14 @@ def config_env(toolchain, variant, env):
|
||||
env.ParseConfig('pkg-config --static --cflags --libs openssl')
|
||||
env.ParseConfig('pkg-config --static --cflags --libs protobuf')
|
||||
|
||||
env.Prepend(CFLAGS=['-Wall'])
|
||||
env.Prepend(CXXFLAGS=['-Wall'])
|
||||
|
||||
env.Append(CCFLAGS=[
|
||||
'-Wall',
|
||||
'-Wno-sign-compare',
|
||||
'-Wno-char-subscripts',
|
||||
'-Wno-format',
|
||||
'-Wno-deprecated-register'
|
||||
])
|
||||
|
||||
env.Append(CXXFLAGS=[
|
||||
@@ -272,9 +275,10 @@ def config_env(toolchain, variant, env):
|
||||
'-Wno-unused-function',
|
||||
])
|
||||
else:
|
||||
env.Append(CCFLAGS=[
|
||||
'-Wno-unused-but-set-variable'
|
||||
])
|
||||
if toolchain == 'gcc':
|
||||
env.Append(CCFLAGS=[
|
||||
'-Wno-unused-but-set-variable'
|
||||
])
|
||||
|
||||
boost_libs = [
|
||||
'boost_date_time',
|
||||
@@ -330,7 +334,6 @@ def config_env(toolchain, variant, env):
|
||||
# Add '-Wshorten-64-to-32'
|
||||
env.Append(CCFLAGS=[])
|
||||
# C++ only
|
||||
# Why is this only for clang?
|
||||
env.Append(CXXFLAGS=['-Wno-mismatched-tags'])
|
||||
|
||||
elif toolchain == 'gcc':
|
||||
|
||||
Reference in New Issue
Block a user