summaryrefslogtreecommitdiffstats
path: root/config.tests/common/atomic64/atomic64.pro
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-09-08 20:35:33 -0300
committerThiago Macieira <thiago.macieira@intel.com>2015-09-22 22:46:08 +0000
commit3d7586b760550b7d89594c8d7462fc30b868ecc6 (patch)
tree926b254d3b72385365c9dd51d66d311b31b71209 /config.tests/common/atomic64/atomic64.pro
parent847d5d1309a4365af7d0f4fa1bff5754b8286e34 (diff)
Auto-detect whether 64-bit std::atomic really works
The C++ standard says it must, but some badly-configured toolchains seem to be lacking support. In particular, for some 32-bit platforms without native support for them, GCC implements 64-bit atomics via out-of-line functions in libatomic. If that library is missing... well, then std::atomic 64-bit doesn't work and we mustn't try to use it. This was found when trying to compile Qt 5.6 for MIPS 32-bit: Linking library libQt5Core.so.5.6.0 .obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::load(std::memory_order) const': /opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:500: undefined reference to `__atomic_load_8' .obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)': /opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:478: undefined reference to `__atomic_store_8' Yocto bug report: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8274 Change-Id: I42e7ef1a481840699a8dffff140224d6614e5c36 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'config.tests/common/atomic64/atomic64.pro')
-rw-r--r--config.tests/common/atomic64/atomic64.pro3
1 files changed, 3 insertions, 0 deletions
diff --git a/config.tests/common/atomic64/atomic64.pro b/config.tests/common/atomic64/atomic64.pro
new file mode 100644
index 0000000000..c9a85817ca
--- /dev/null
+++ b/config.tests/common/atomic64/atomic64.pro
@@ -0,0 +1,3 @@
+SOURCES = atomic64.cpp
+CONFIG += c++11 console
+CONFIG -= qt