ceph/cmake/modules
Kefu Chai 34b33d447f cmake: check for unaligned access
C and C++ allow us to cast a pointer with an alignment requirement to
one with a different alignment requirement. but if the destination
type's alignment is greater/stricter than the source type, the behavior
is undefined. on amd64, it's allowed. and on aarch64, GCC offers an
option named `-munaligned-access` to enable this behavior. so we cannot
take this as guaranteed.

in denc.h and messenger implementations, we just cast the pointers to
the type we want to access without memcpy(), which is, strictly
speaking, not quite standard compliant.

so, to be on the safe side, we detect the support of unaligned access at
compile time.

please note, this would fail the cross-compile. as the target platform
might not support unaligned access, and the produced executable does not
run on the build platform. so this test is skipped if the building
host's architecture is different than that of target host.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-11 12:47:26 +08:00
..
FindPython cmake: update FindPython* modules 2019-07-20 22:35:07 +08:00
AddCephTest.cmake mgr/dashboard: clean-up tox and unit tests 2019-08-16 19:17:27 +02:00
boost_context_asm_arm_syntax_unified.patch cmake: move boost patch to cmake/modules 2019-06-12 16:32:10 +08:00
boost_lockfree_queue_valgrind_error.patch cmake: boost valgrind fixes for boost::lockfree::queue 2019-06-28 10:56:03 -04:00
BuildBoost.cmake cmake: update FindPython* modules 2019-07-20 22:35:07 +08:00
Buildc-ares.cmake
BuildDPDK.cmake cmake: update built libs of SPDK and DPDK 2019-06-13 19:35:26 +08:00
BuildFIO.cmake
Buildpmem.cmake cmake: move pmdk build script to Buildpmem.cmake 2019-07-10 11:43:27 -04:00
BuildQatDrv.cmake
BuildRocksDB.cmake cmake/modules/BuildRocksDB.cmake: use BUILD_ALWAYS 2019-07-11 19:30:28 +08:00
BuildSPDK.cmake cmake: silence -Waddress-of-packed-member warnings from SPDK 2019-06-13 19:35:26 +08:00
CephChecks.cmake cmake: check for unaligned access 2019-09-11 12:47:26 +08:00
CheckCxxAtomic.cmake
CheckYasm.cmake
CTags.cmake
Distutils.cmake cmake/modules/Distutils: do not add ${name}-clone if already added 2019-07-26 12:11:25 +02:00
Findaio.cmake
Findbabeltrace.cmake
FindBacktrace.cmake
Findblkid.cmake
FindBoost.cmake cmake: update FindBoost.cmake 2019-07-30 16:00:04 +02:00
Findc-ares.cmake
FindCUnit.cmake
FindCython.cmake cmake: update FindPython* modules 2019-07-20 22:35:07 +08:00
Finddpdk.cmake
Findfcgi.cmake
Findfio.cmake
Findfmt.cmake
Findfuse.cmake
FindGMock.cmake
Findgperftools.cmake
FindGSSApi.cmake
FindJeMalloc.cmake
Findkeyutils.cmake
Findleveldb.cmake
FindLTTngUST.cmake
FindLZ4.cmake
Findnl.cmake cmake: rewrite Findgenl to support components argument 2019-06-19 21:21:00 +08:00
FindOATH.cmake
FindOpenLdap.cmake
Findpmem.cmake cmake: Add the support to use system PMDK library 2019-07-10 11:43:27 -04:00
FindPython2.cmake cmake: update FindPython* modules 2019-07-20 22:35:07 +08:00
FindPython3.cmake cmake: update FindPython* modules 2019-07-20 22:35:07 +08:00
FindPython.cmake cmake: update FindPython* modules 2019-07-20 22:35:07 +08:00
Findqatzip.cmake
FindRabbitMQ.cmake
Findrdmacm.cmake
FindRocksDB.cmake
FindSanitizers.cmake
Findsnappy.cmake
FindStdFilesystem_test.cc
FindStdFilesystem.cmake cmake: require CMake v3.10.2 2019-08-02 22:09:12 +08:00
Findudev.cmake
Finduuid.cmake
Findverbs.cmake
Findxfs.cmake
Findzfs.cmake
GetGitRevisionDescription.cmake
GetGitRevisionDescription.cmake.in
patch-dpdk-conf.sh
SIMDExt.cmake