ceph/cmake/modules
Ulrich Weigand c58fc258a2 cmake: Improve test for 16-byte atomic support on IBM Z
Commit d1b9d14324 added a check for
16-byte atomics without library support on IBM Z.  Unfortunately
it turns out this test only works correctly when the test case
is built without optimization.  (This is normally true, but it
may not be the case when passing explicit CXXFLAGS to cmake.)

The underlying reason is that GCC may choose to use either an
inline implementation of the 16-byte atomics or library calls,
depending on whether or not it is able to prove the atomic
variable is properly aligned.  At -O0 it is never able to prove
that, but at higher optimization levels it depends on the complexity
of the expression (in particular, whether GCC can track down the
definition of the underlying object).

As the test case uses a very simple expression, it may happen that
this test can be built without requiring library support, but some
of the "real" uses of atomics in Ceph code cannot.   This defeats
the whole purpose of the test at configure time.

Fixed by making the access pattern in the test more complex, so
that the test fails even at high optimization levels.

Fixes: https://tracker.ceph.com/issues/43747

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2020-01-23 13:13:58 +01:00
..
FindPython
AddCephTest.cmake
BuildBoost.cmake CMake - Workaround set Boost_component_FOUND 2020-01-08 11:31:04 -05:00
Buildc-ares.cmake
BuildDPDK.cmake
BuildFIO.cmake
Buildpmem.cmake
BuildQatDrv.cmake
BuildRocksDB.cmake
BuildSPDK.cmake
CephCheck_link.c
CephCheck_link.map
CephChecks.cmake
CheckCxxAtomic.cmake cmake: Improve test for 16-byte atomic support on IBM Z 2020-01-23 13:13:58 +01:00
CheckYasm.cmake
CTags.cmake
Distutils.cmake
Findaio.cmake
Findbabeltrace.cmake
FindBacktrace.cmake
Findblkid.cmake
FindBoost.cmake cmake: update FindBoost.cmake for 1.72 2019-12-22 23:56:52 +08:00
Findc-ares.cmake
FindCppCheck.cmake
FindCUnit.cmake
FindCython.cmake
Finddpdk.cmake
Findfcgi.cmake
Findfio.cmake
Findfmt.cmake
Findfuse.cmake
FindGMock.cmake
Findgperftools.cmake
FindGSSApi.cmake
FindIWYU.cmake
FindJeMalloc.cmake
Findkeyutils.cmake
Findleveldb.cmake
FindLTTngUST.cmake
FindLZ4.cmake
Findnl.cmake
FindNUMA.cmake
FindOATH.cmake
FindOpenLdap.cmake
Findpmem.cmake
FindPython3.cmake
Findqatzip.cmake
FindRabbitMQ.cmake
FindRDKafka.cmake
Findrdmacm.cmake
FindRocksDB.cmake
FindSanitizers.cmake
Findsnappy.cmake
FindStdFilesystem_test.cc
FindStdFilesystem.cmake
Findudev.cmake
Finduuid.cmake
Findverbs.cmake
Findxfs.cmake
Findzfs.cmake
GetGitRevisionDescription.cmake
GetGitRevisionDescription.cmake.in
patch-dpdk-conf.sh
SIMDExt.cmake