Correctly detect whether strict alignment is needed on OpenBSD
From Stefan Sperling <stsp@apache.org>
This commit is contained in:
parent
768bd6e533
commit
00dc8c0246
10
compile.c
10
compile.c
@ -841,6 +841,16 @@ rb_iseq_original_iseq(const rb_iseq_t *iseq) /* cold path */
|
||||
#define STRICT_ALIGNMENT
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Some OpenBSD platforms (including sparc64) require strict alignment.
|
||||
*/
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/endian.h>
|
||||
#ifdef __STRICT_ALIGNMENT
|
||||
#define STRICT_ALIGNMENT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef STRICT_ALIGNMENT
|
||||
#if defined(HAVE_TRUE_LONG_LONG) && SIZEOF_LONG_LONG > SIZEOF_VALUE
|
||||
#define ALIGNMENT_SIZE SIZEOF_LONG_LONG
|
||||
|
Loading…
x
Reference in New Issue
Block a user