summaryrefslogtreecommitdiffstats
path: root/configure.pri
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2017-08-30 13:02:20 +0200
committerMichal Klocek <michal.klocek@qt.io>2017-09-05 16:16:38 +0000
commit6d9fe6ba35024efc8e0a26435b51e25aa3ea7f09 (patch)
tree95a27a42c5ec80a109863ef460c5cec7c8f0e0f5 /configure.pri
parentfe547d51e8f3feef433bfde77b17048c8aa9ed72 (diff)
Add check for glibc > 2.16
Fix broken compilation due to "Unable to create small static TLS block in shared library" https://sourceware.org/bugzilla/show_bug.cgi?id=14898 Change-Id: I53840dbff22f4b10bdb32401f79889f6c313f470 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'configure.pri')
-rw-r--r--configure.pri20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.pri b/configure.pri
index 2d6983354..0030ce3bb 100644
--- a/configure.pri
+++ b/configure.pri
@@ -71,6 +71,26 @@ defineTest(qtConfTest_detectFlex) {
return(true)
}
+defineTest(qtConfTest_detectGlibc) {
+ ldd = $$qtConfFindInPath("ldd")
+ !isEmpty(ldd) {
+ qtLog("Found ldd from path: $$ldd")
+ qtRunLoggedCommand("$$ldd --version", version)|return(true)
+ version ~= 's/^.*[^0-9]\([0-9]*\.[0-9]*\).*$/\1/'
+ version = $$first(version)
+ qtLog("Found libc version: $$version")
+ version = $$split(version,'.')
+ version = $$member(version, 1)
+ greaterThan(version, 16) {
+ return(true)
+ }
+ qtLog("Detected too old version of glibc. Required min 2.17.")
+ return(false)
+ }
+ qtLog("No ldd found. Assuming right version of glibc.")
+ return(true)
+}
+
defineTest(qtConfTest_detectNinja) {
ninja = $$qtConfFindInPath("ninja$$EXE_SUFFIX")
!isEmpty(ninja) {