diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-05-03 22:26:05 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-05-10 11:36:56 +0300 |
commit | 4213dc53dccf9028038dbe6933b224d171ef5c3a (patch) | |
tree | 55ea51091334352b8161eead857a96a4406fc894 | |
parent | 8ff9bcb22a94567a555cd2c75b051d0979101ff7 (diff) | |
download | qtlocation-mapboxgl-4213dc53dccf9028038dbe6933b224d171ef5c3a.tar.gz |
[Qt] Use C++11 ABI packages
These were causing linking errors on more recent Linux distros.
Fixes #3123.
-rw-r--r-- | platform/linux/scripts/configure.sh | 4 | ||||
-rw-r--r-- | platform/qt/scripts/configure.sh | 4 | ||||
-rwxr-xr-x | scripts/check-cxx11abi.dat | bin | 0 -> 8780 bytes | |||
-rwxr-xr-x | scripts/check-cxx11abi.sh | 14 | ||||
-rw-r--r-- | scripts/main.mk | 2 |
5 files changed, 20 insertions, 4 deletions
diff --git a/platform/linux/scripts/configure.sh b/platform/linux/scripts/configure.sh index 01b7541200..b2e79d9cc6 100644 --- a/platform/linux/scripts/configure.sh +++ b/platform/linux/scripts/configure.sh @@ -12,10 +12,10 @@ LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 GEOMETRY_VERSION=0.3.0 -GEOJSONVT_VERSION=4.1.2 +GEOJSONVT_VERSION=4.1.2${CXX11ABI} VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 -GTEST_VERSION=1.7.0 +GTEST_VERSION=1.7.0${CXX11ABI} PIXELMATCH_VERSION=0.9.0 WEBP_VERSION=0.5.0 diff --git a/platform/qt/scripts/configure.sh b/platform/qt/scripts/configure.sh index 500ef2663a..612a987ec7 100644 --- a/platform/qt/scripts/configure.sh +++ b/platform/qt/scripts/configure.sh @@ -3,8 +3,8 @@ PROTOZERO_VERSION=1.3.0 BOOST_VERSION=1.60.0 GEOMETRY_VERSION=0.3.0 -GEOJSONVT_VERSION=4.1.2 -GTEST_VERSION=1.7.0 +GEOJSONVT_VERSION=4.1.2${CXX11ABI} +GTEST_VERSION=1.7.0${CXX11ABI} LIBJPEG_TURBO_VERSION=1.4.2 NUNICODE_VERSION=1.6 PIXELMATCH_VERSION=0.9.0 diff --git a/scripts/check-cxx11abi.dat b/scripts/check-cxx11abi.dat Binary files differnew file mode 100755 index 0000000000..eab7298b50 --- /dev/null +++ b/scripts/check-cxx11abi.dat diff --git a/scripts/check-cxx11abi.sh b/scripts/check-cxx11abi.sh new file mode 100755 index 0000000000..ba64df1e79 --- /dev/null +++ b/scripts/check-cxx11abi.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +# check-cxx11abi.dat is a binary just so we can use the loader +# to take care of finding the libstdc++ which can be tricky. +LIBSTDCPP=$(ldd $(dirname $0)/check-cxx11abi.dat |grep libstdc++ |cut -d' ' -f3) + +if [ $(readelf -Ws $LIBSTDCPP |c++filt |grep -c ::__cxx11::) -gt 0 ]; then + echo "-cxx11abi" +else + echo "" +fi diff --git a/scripts/main.mk b/scripts/main.mk index bc7506db5c..56b3fcd0c5 100644 --- a/scripts/main.mk +++ b/scripts/main.mk @@ -2,6 +2,7 @@ ifeq ($(shell uname -s), Darwin) export PLATFORM ?= osx else ifeq ($(shell uname -s), Linux) export PLATFORM ?= linux + export CXX11ABI = $(shell scripts/check-cxx11abi.sh) endif ifeq ($(PLATFORM),android) @@ -48,6 +49,7 @@ ifeq ($(PLATFORM),qt) endif # Defaults if not set +export CXX11ABI ?= "" export PLATFORM_OUTPUT ?= ./build/$(PLATFORM_SLUG) export PLATFORM_CONFIG_INPUT ?= platform/$(MASON_PLATFORM)/scripts/configure.sh export PLATFORM_CONFIG_OUTPUT ?= $(PLATFORM_OUTPUT)/config.gypi |