[前][次][番号順一覧][スレッド一覧]

ruby-changes:60376

From: Jeremy <ko1@a...>
Date: Fri, 13 Mar 2020 07:48:11 +0900 (JST)
Subject: [ruby-changes:60376] 00dc8c0246 (master): Correctly detect whether strict alignment is needed on OpenBSD

https://git.ruby-lang.org/ruby.git/commit/?id=00dc8c0246

From 00dc8c024616d0cb495de5ef71e38b34e18cf79b Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Thu, 12 Mar 2020 15:45:03 -0700
Subject: Correctly detect whether strict alignment is needed on OpenBSD

From Stefan Sperling <stsp@a...>

diff --git a/compile.c b/compile.c
index b5c84a8..9c8f4dd 100644
--- a/compile.c
+++ b/compile.c
@@ -841,6 +841,16 @@ rb_iseq_original_iseq(const rb_iseq_t *iseq) /* cold path */ https://github.com/ruby/ruby/blob/trunk/compile.c#L841
   #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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]