mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +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
|
mkdir -p $BOOST_ROOT/stage
|
||||||
ln -s /usr/lib/x86_64-linux-gnu $BOOST_ROOT/stage/lib
|
ln -s /usr/lib/x86_64-linux-gnu $BOOST_ROOT/stage/lib
|
||||||
ln -s /usr/include/boost $BOOST_ROOT/boost
|
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 apt-get install -qq mlocate
|
||||||
- sudo updatedb
|
- sudo updatedb
|
||||||
- sudo locate libboost | grep /lib | grep -e ".a$"
|
- 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)
|
||||||
@@ -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 openssl')
|
||||||
env.ParseConfig('pkg-config --static --cflags --libs protobuf')
|
env.ParseConfig('pkg-config --static --cflags --libs protobuf')
|
||||||
|
|
||||||
|
env.Prepend(CFLAGS=['-Wall'])
|
||||||
|
env.Prepend(CXXFLAGS=['-Wall'])
|
||||||
|
|
||||||
env.Append(CCFLAGS=[
|
env.Append(CCFLAGS=[
|
||||||
'-Wall',
|
|
||||||
'-Wno-sign-compare',
|
'-Wno-sign-compare',
|
||||||
'-Wno-char-subscripts',
|
'-Wno-char-subscripts',
|
||||||
'-Wno-format',
|
'-Wno-format',
|
||||||
|
'-Wno-deprecated-register'
|
||||||
])
|
])
|
||||||
|
|
||||||
env.Append(CXXFLAGS=[
|
env.Append(CXXFLAGS=[
|
||||||
@@ -272,6 +275,7 @@ def config_env(toolchain, variant, env):
|
|||||||
'-Wno-unused-function',
|
'-Wno-unused-function',
|
||||||
])
|
])
|
||||||
else:
|
else:
|
||||||
|
if toolchain == 'gcc':
|
||||||
env.Append(CCFLAGS=[
|
env.Append(CCFLAGS=[
|
||||||
'-Wno-unused-but-set-variable'
|
'-Wno-unused-but-set-variable'
|
||||||
])
|
])
|
||||||
@@ -330,7 +334,6 @@ def config_env(toolchain, variant, env):
|
|||||||
# Add '-Wshorten-64-to-32'
|
# Add '-Wshorten-64-to-32'
|
||||||
env.Append(CCFLAGS=[])
|
env.Append(CCFLAGS=[])
|
||||||
# C++ only
|
# C++ only
|
||||||
# Why is this only for clang?
|
|
||||||
env.Append(CXXFLAGS=['-Wno-mismatched-tags'])
|
env.Append(CXXFLAGS=['-Wno-mismatched-tags'])
|
||||||
|
|
||||||
elif toolchain == 'gcc':
|
elif toolchain == 'gcc':
|
||||||
|
|||||||
Reference in New Issue
Block a user