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

ruby-changes:70945

From: Jeremy <ko1@a...>
Date: Wed, 19 Jan 2022 04:54:49 +0900 (JST)
Subject: [ruby-changes:70945] e7b4abf384 (master): Don't assume __builtin_bswap32 and __builtin_bswap64 are defined on OpenBSD

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

From e7b4abf3845ef006653ef4b951454647e54affe8 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Tue, 18 Jan 2022 11:40:13 -0800
Subject: Don't assume __builtin_bswap32 and __builtin_bswap64 are defined on
 OpenBSD

At least OpenBSD/sparc64 doesn't appear to define them, and possibly
some other OpenBSD GCC platforms don't (most OpenBSD platforms have
already switched to clang).
---
 include/ruby/internal/has/builtin.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/ruby/internal/has/builtin.h b/include/ruby/internal/has/builtin.h
index 957aff8375f..c7b1ba44a73 100644
--- a/include/ruby/internal/has/builtin.h
+++ b/include/ruby/internal/has/builtin.h
@@ -53,8 +53,10 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/has/builtin.h#L53
 # define RBIMPL_HAS_BUILTIN___builtin_assume            0
 # /* See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for bswap16. */
 # define RBIMPL_HAS_BUILTIN___builtin_bswap16           RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+#ifndef __OpenBSD__
 # define RBIMPL_HAS_BUILTIN___builtin_bswap32           RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
 # define RBIMPL_HAS_BUILTIN___builtin_bswap64           RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+#endif
 # define RBIMPL_HAS_BUILTIN___builtin_clz               RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
 # define RBIMPL_HAS_BUILTIN___builtin_clzl              RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
 # define RBIMPL_HAS_BUILTIN___builtin_clzll             RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
-- 
cgit v1.2.1


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

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