From 6d9fe6ba35024efc8e0a26435b51e25aa3ea7f09 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 30 Aug 2017 13:02:20 +0200 Subject: 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 --- configure.pri | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'configure.pri') 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) { -- cgit v1.2.3