pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/48672 (devel/ruby-atomic build fails on NetBSD/m68k and !x86 other ports)
The following reply was made to PR pkg/48672; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: pkg/48672 (devel/ruby-atomic build fails on NetBSD/m68k and !x86
other ports)
Date: Mon, 21 Apr 2014 22:43:24 +0900
Here is an updated patch for recent atomic-1.1.15.
(it looks 1.1.15 no longer checks gcc's cas builtins)
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/ruby-atomic/Makefile,v
retrieving revision 1.2
diff -u -p -d -r1.2 Makefile
--- Makefile 14 Mar 2014 15:19:51 -0000 1.2
+++ Makefile 21 Apr 2014 12:13:32 -0000
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.2 2014/03/14 15:19:51 taca Exp $
DISTNAME= atomic-1.1.15
+PKGREVISION= 1
CATEGORIES= devel
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/ruby-atomic/distinfo,v
retrieving revision 1.2
diff -u -p -d -r1.2 distinfo
--- distinfo 14 Mar 2014 15:19:51 -0000 1.2
+++ distinfo 21 Apr 2014 12:13:32 -0000
@@ -3,3 +3,4 @@ $NetBSD: distinfo,v 1.2 2014/03/14 15:19
SHA1 (atomic-1.1.15.gem) = 6bfba5ecf9de5da4181b705dfd08ef9f59e016a4
RMD160 (atomic-1.1.15.gem) = 9ff8b80d048c7f09e6d59b8befc1565d5bb000fe
Size (atomic-1.1.15.gem) = 16896 bytes
+SHA1 (patch-ext_atomic__reference.c) =
9db50e037a09afb10c7be0c6a2c42c95e8d606e4
--- /dev/null 2014-04-21 12:12:19.000000000 +0000
+++ patches/patch-ext_atomic__reference.c 2014-04-21 12:12:10.000000000
+0000
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Check and use NetBSD's atomic_ops(3).
+At least gcc 4.5.x for arm and m68k in NetBSD 6.x base doesn't provide
+__sync_bool_compare_and_swap().
+
+--- ext/atomic_reference.c.orig 2014-04-21 12:05:31.000000000 +0000
++++ ext/atomic_reference.c
+@@ -14,6 +14,9 @@
+ #if defined(__sun)
+ #include <atomic.h>
+ #endif
++#if defined(__NetBSD__)
++#include <sys/atomic.h>
++#endif
+
+ #ifdef HAVE_LIBKERN_OSATOMIC_H
+ #include <libkern/OSAtomic.h>
+@@ -79,6 +82,10 @@ static VALUE ir_compare_and_set(volatile
+ if (InterlockedCompareExchange((LONG*)&DATA_PTR(self), new_value,
expect_value)) {
+ return Qtrue;
+ }
++#elif defined(__NetBSD__)
++ if (atomic_cas_ptr((volatile void *) &DATA_PTR(self), expect_value,
new_value)) {
++ return Qtrue;
++ }
+ #else
+ if (__sync_bool_compare_and_swap(&DATA_PTR(self), expect_value,
new_value)) {
+ return Qtrue;
Home |
Main Index |
Thread Index |
Old Index