diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-10-27 19:48:04 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-06-09 15:58:23 +0000 |
commit | 7835b260a9f60c98ee41468b040ac080782afe2f (patch) | |
tree | 455e2f34ba34b1d255283a1b8085d5fb558a1d41 /tools | |
parent | 0a78d918f0f411e0da2242a84a396f169154f5d6 (diff) |
configure: check whether std::atomic<T> works for function pointers
And ask the user to apply one of the patches we're carrying to their
Standard Libraries.
Change-Id: I7e6338336dd6468ead24ffff141139c79056922e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 6dc551ceb5..395c4a0b54 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2172,6 +2172,9 @@ bool Configure::checkAvailability(const QString &part) else if (part == "ATOMIC64-LIBATOMIC") available = tryCompileProject("common/atomic64", "LIBS+=-latomic"); + else if (part == "ATOMICFPTR") + available = tryCompileProject("common/atomicfptr"); + else if (part == "ZLIB") available = findFile("zlib.h"); @@ -2338,6 +2341,15 @@ void Configure::autoDetection() dictionary["ATOMIC64"] = checkAvailability("ATOMIC64") ? "yes" : checkAvailability("ATOMIC64-LIBATOMIC") ? "libatomic" : "no"; + // special case: + if (!checkAvailability("ATOMICFPTR")) { + dictionary["DONE"] = "error"; + cout << "ERROR: detected an std::atomic implementation that fails for function pointers." << endl + << "Please apply the patch corresponding to your Standard Library vendor, found in" << endl + << sourcePath << "/config.tests/common/atomicfptr" << endl; + return; + } + // Style detection if (dictionary["STYLE_WINDOWSXP"] == "auto") dictionary["STYLE_WINDOWSXP"] = checkAvailability("STYLE_WINDOWSXP") ? defaultTo("STYLE_WINDOWSXP") : "no"; |