From 7784323ccaa683e6a437102e12702bcffbcadf21 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Mon, 5 Oct 2015 14:18:13 -0700 Subject: [PATCH] [linux] gcc-5 keep libstdc++-4.9-dev for clang builds because error: debug information for auto is not yet supported https://stackoverflow.com/questions/24617679/workaround-for-debug-symbol-error-with-auto-member-function --- .travis.yml | 4 ++-- gyp/common.gypi | 3 +-- platform/default/image.cpp | 3 +++ platform/default/sqlite3.cpp | 3 +++ src/mbgl/util/compression.cpp | 3 +++ src/mbgl/util/uv.cpp | 3 +++ 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d9e0cdb179d..0236493ae11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,11 @@ matrix: - os: linux include: - os: linux - env: FLAVOR=linux CXX=g++-4.9 BUILDTYPE=Release + env: FLAVOR=linux CXX=g++-5 BUILDTYPE=Release addons: apt: sources: [ 'ubuntu-toolchain-r-test' ] - packages: [ 'gdb', 'g++-4.9', 'gcc-4.9', 'libllvm3.4', 'xutils-dev', 'libxxf86vm-dev', 'x11proto-xf86vidmode-dev', 'mesa-utils' ] + packages: [ 'gdb', 'g++-5', 'gcc-5', 'libllvm3.4', 'xutils-dev', 'libxxf86vm-dev', 'x11proto-xf86vidmode-dev', 'mesa-utils' ] - os: linux env: FLAVOR=linux CXX=clang++-3.5 BUILDTYPE=Debug addons: diff --git a/gyp/common.gypi b/gyp/common.gypi index b44f6986830..5871779a2e0 100644 --- a/gyp/common.gypi +++ b/gyp/common.gypi @@ -12,7 +12,7 @@ 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'GCC_ENABLE_CPP_RTTI': 'YES', 'OTHER_CPLUSPLUSFLAGS': [ - '-std=c++1y', + '-std=c++14', '-Werror', '-Wall', '-Wextra', @@ -35,7 +35,6 @@ '-Wshadow', '-Wno-variadic-macros', '-Wno-error=unused-parameter', - '-Wno-c++1y-extensions', '-frtti', '-fexceptions', '${CFLAGS}', diff --git a/platform/default/image.cpp b/platform/default/image.cpp index d7dcfc38b55..3840934f140 100644 --- a/platform/default/image.cpp +++ b/platform/default/image.cpp @@ -11,6 +11,8 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" // Check png library version. const static bool png_version_check = []() { const png_uint_32 version = png_access_version_number(); @@ -22,6 +24,7 @@ const static bool png_version_check = []() { } return true; }(); +#pragma GCC diagnostic pop namespace mbgl { diff --git a/platform/default/sqlite3.cpp b/platform/default/sqlite3.cpp index ca525cd20ba..85ef08ab054 100644 --- a/platform/default/sqlite3.cpp +++ b/platform/default/sqlite3.cpp @@ -5,6 +5,8 @@ #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" // Check sqlite3 library version. const static bool sqliteVersionCheck = []() { if (sqlite3_libversion_number() / 1000000 != SQLITE_VERSION_NUMBER / 1000000) { @@ -17,6 +19,7 @@ const static bool sqliteVersionCheck = []() { return true; }(); +#pragma GCC diagnostic pop namespace mapbox { namespace sqlite { diff --git a/src/mbgl/util/compression.cpp b/src/mbgl/util/compression.cpp index 139dba75466..2f1a1d45638 100644 --- a/src/mbgl/util/compression.cpp +++ b/src/mbgl/util/compression.cpp @@ -7,6 +7,8 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" // Check zlib library version. const static bool zlibVersionCheck = []() { const char *const version = zlibVersion(); @@ -19,6 +21,7 @@ const static bool zlibVersionCheck = []() { return true; }(); +#pragma GCC diagnostic pop namespace mbgl { diff --git a/src/mbgl/util/uv.cpp b/src/mbgl/util/uv.cpp index 353d6ccc91e..fe5d4bd9485 100644 --- a/src/mbgl/util/uv.cpp +++ b/src/mbgl/util/uv.cpp @@ -4,6 +4,8 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" // Check libuv library version. const static bool uvVersionCheck = []() { const unsigned int version = uv_version(); @@ -23,6 +25,7 @@ const static bool uvVersionCheck = []() { } return true; }(); +#pragma GCC diagnostic pop #if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10