Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix boost #434

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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$"
Expand Down
13 changes: 13 additions & 0 deletions Builds/travis/clang.boost.patch
Original file line number Diff line number Diff line change
@@ -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 changes: 10 additions & 0 deletions Builds/travis/static_error.boost.patch
Original file line number Diff line number Diff line change
@@ -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)
28 changes: 23 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,31 @@ 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'
])

# Supress certain (less important) things for Travis builds to keep the
# noise down. These are enabled for developer builds because we want to
# squash warnings.
if Beast.system.travis:
env.Append(CCFLAGS=[
'-Wno-unused-variable',
'-Wno-unused-function'
])

if toolchain == 'clang':
env.Append(CCFLAGS=[
'-Wno-unused-private-field',
'-Wno-unused-const-variable',
])

env.Append(CXXFLAGS=[
'-frtti',
'-std=c++11',
Expand All @@ -272,9 +290,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',
Expand Down Expand Up @@ -330,7 +349,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':
Expand Down