diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-06-01 20:37:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 20:37:27 +0300 |
commit | ec3e0b276b159ab24946f17f2b89d00862488a6a (patch) | |
tree | 02a5c3fb5ef19c0016d8c30018e39a2265773aba | |
parent | 4ce05fa319721fe56249bef6bdc827fac808eb04 (diff) |
[release/6.0-preview5] [build] Define NO_UNALIGNED_ACCESS for 32-bit arm platforms (#52942)v6.0.0-preview.5.21301.5
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
-rw-r--r-- | src/mono/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/mono/cmake/config.h.in | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 7cf602f7d3c..22cf849b446 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -361,6 +361,8 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") set(HOST_ARM64 1) elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") set(HOST_ARM 1) + # fixme: use separate defines for host/target + set(NO_UNALIGNED_ACCESS 1) elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x") set(HOST_S390X 1) elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "wasm") @@ -413,6 +415,8 @@ elseif(TARGET_ARCH MATCHES "arm") add_definitions("-DARM_FPU_VFP=1") set(TARGET_SIZEOF_VOID_P 4) set(SIZEOF_REGISTER 4) + # fixme: use separate defines for host/target + set(NO_UNALIGNED_ACCESS 1) elseif(TARGET_ARCH STREQUAL "s390x") set(TARGET_S390X 1) set(MONO_ARCHITECTURE "\"s390x\"") diff --git a/src/mono/cmake/config.h.in b/src/mono/cmake/config.h.in index 4fe9f54caf7..d49cbd3b9a9 100644 --- a/src/mono/cmake/config.h.in +++ b/src/mono/cmake/config.h.in @@ -911,6 +911,9 @@ /* size of target machine integer registers */ #define SIZEOF_REGISTER @SIZEOF_REGISTER@ +/* host or target doesn't allow unaligned memory access */ +#cmakedefine NO_UNALIGNED_ACCESS 1 + /* Support for the visibility ("hidden") attribute */ #cmakedefine HAVE_VISIBILITY_HIDDEN 1 |