Fix zstd on OpenBSD/sparc64
Functions like MEM_read32 could still perform unaligned accesses on OpenBSD/sparc64 with gcc, possibly related to gcc bug 51628. The solution is to switch to a safe memcpy-based solution and let the compiler do any optimizations.
This commit is contained in:
parent
b4a85e8904
commit
c097bd7799
1 changed files with 4 additions and 0 deletions
|
|
@ -113,6 +113,10 @@ if cc_id == compiler_msvc
|
|||
add_project_arguments(msvc_compile_flags, language: ['c', 'cpp'])
|
||||
endif
|
||||
|
||||
# Use the safe way to access unaligned values as all other methods fail
|
||||
# on OpenBSD/sparc64 with gcc.
|
||||
add_project_arguments('-DMEM_FORCE_MEMORY_ACCESS=0', language: ['c', 'cpp'])
|
||||
|
||||
# =============================================================================
|
||||
# Subdirs
|
||||
# =============================================================================
|
||||
|
|
|
|||
Loading…
Reference in a new issue