Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] Define NO_UNALIGNED_ACCESS for 32-bit arm platforms #52915

Merged
merged 2 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/mono/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,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")
Expand Down Expand Up @@ -405,6 +407,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\"")
Expand Down
3 changes: 3 additions & 0 deletions src/mono/cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,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

Expand Down