diff --git a/.travis.yml b/.travis.yml index d6b58e8e0b..0903b75f2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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$" diff --git a/Builds/travis/clang.boost.patch b/Builds/travis/clang.boost.patch new file mode 100644 index 0000000000..7234a99970 --- /dev/null +++ b/Builds/travis/clang.boost.patch @@ -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 + // diff --git a/Builds/travis/static_error.boost.patch b/Builds/travis/static_error.boost.patch new file mode 100644 index 0000000000..68a34b1796 --- /dev/null +++ b/Builds/travis/static_error.boost.patch @@ -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) diff --git a/SConstruct b/SConstruct index 5968d5adce..ff474550be 100644 --- a/SConstruct +++ b/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':