summaryrefslogtreecommitdiff
path: root/scripts/check-cxx11abi.sh
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-05-03 22:26:05 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-05-10 11:36:56 +0300
commit4213dc53dccf9028038dbe6933b224d171ef5c3a (patch)
tree55ea51091334352b8161eead857a96a4406fc894 /scripts/check-cxx11abi.sh
parent8ff9bcb22a94567a555cd2c75b051d0979101ff7 (diff)
downloadqtlocation-mapboxgl-4213dc53dccf9028038dbe6933b224d171ef5c3a.tar.gz
[Qt] Use C++11 ABI packages
These were causing linking errors on more recent Linux distros. Fixes #3123.
Diffstat (limited to 'scripts/check-cxx11abi.sh')
-rwxr-xr-xscripts/check-cxx11abi.sh14
1 files changed, 14 insertions, 0 deletions
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