[Qt] Use C++11 ABI packages

These were causing linking errors on more recent Linux distros.

Fixes #3123.
This commit is contained in:
Thiago Marcos P. Santos
2016-05-03 22:26:05 +03:00
parent 8ff9bcb22a
commit 4213dc53dc
5 changed files with 20 additions and 4 deletions

BIN
scripts/check-cxx11abi.dat Executable file

Binary file not shown.

14
scripts/check-cxx11abi.sh Executable file
View File

@@ -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

View File

@@ -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