diff options
author | Jeremy Evans <[email protected]> | 2020-03-12 15:45:03 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2020-03-12 15:45:03 -0700 |
commit | 00dc8c024616d0cb495de5ef71e38b34e18cf79b (patch) | |
tree | bdfd1ea62485b45872b82b0984514617849c6388 /compile.c | |
parent | 768bd6e533c7a01eaa41dca808ce56dae4af8f2a (diff) |
Correctly detect whether strict alignment is needed on OpenBSD
From Stefan Sperling <[email protected]>
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |