Add a patch to fix bignum problem on OS X 10.8, clang.

Bump PKGREVISION.
This commit is contained in:
taca 2012-09-14 15:56:23 +00:00
parent f2cccd9d3d
commit bbe2299751
3 changed files with 40 additions and 2 deletions

View file

@ -1,8 +1,9 @@
# $NetBSD: Makefile,v 1.72 2012/07/24 16:23:37 taca Exp $
# $NetBSD: Makefile,v 1.73 2012/09/14 15:56:23 taca Exp $
#
DISTNAME= ${RUBY_DISTNAME}
PKGNAME= ${RUBY_PKGPREFIX}-base-${RUBY_VERSION_FULL}
PKGREVISION= 1
CATEGORIES= lang ruby
MASTER_SITES= ${MASTER_SITE_RUBY}

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.54 2012/07/25 20:25:50 bsiegert Exp $
$NetBSD: distinfo,v 1.55 2012/09/14 15:56:23 taca Exp $
SHA1 (ruby-1.8.7-p370.tar.bz2) = 92770a8159cd9049ffc5bc3ce4777b701eb19d7b
RMD160 (ruby-1.8.7-p370.tar.bz2) = 0c35ed92e4e77c6e6859d39244489c93f4efad50
@ -49,3 +49,4 @@ SHA1 (patch-ga) = 73f50504baf74ee77d00dcfb5a9446bbaf122726
SHA1 (patch-gb) = 345ad3e5df6fd9febe7b398f091662fd7c300dc4
SHA1 (patch-lib_rdoc_options.rb) = 0f14417733ad6fc6fbc93af1c8463ecd59abce7c
SHA1 (patch-lib_rdoc_rdoc.rb) = bef895245cc06ca84fd1e5d506c3c65932921b3a
SHA1 (patch-numeric.c) = f4175d27af5c68c38ba9049dca56a90b3b21b8f3

View file

@ -0,0 +1,36 @@
$NetBSD: patch-numeric.c,v 1.1 2012/09/14 15:56:23 taca Exp $
Fix bignum problem on OS X 10.8, clang.
--- numeric.c.orig 2011-12-10 12:17:27.000000000 +0000
+++ numeric.c
@@ -2161,7 +2161,7 @@ fix_mul(x, y)
VALUE x, y;
{
if (FIXNUM_P(y)) {
-#ifdef __HP_cc
+#if defined(__HP_cc) || defined(__clang__)
/* avoids an optimization bug of HP aC++/ANSI C B3910B A.06.05 [Jul 25 2005] */
volatile
#endif
@@ -2319,9 +2319,9 @@ int_pow(x, y)
y &= ~1;
do {
while (y % 2 == 0) {
- long x2 = x * x;
+ volatile long x2 = x * x;
if (x2/x != x || !POSFIXABLE(x2)) {
- VALUE v;
+ volatile VALUE v;
bignum:
v = rb_big_pow(rb_int2big(x), LONG2NUM(y));
if (z != 1) v = rb_big_mul(rb_int2big(neg ? -z : z), v);
@@ -2331,7 +2331,7 @@ int_pow(x, y)
y >>= 1;
}
{
- long xz = x * z;
+ volatile long xz = x * z;
if (!POSFIXABLE(xz) || xz / x != z) {
goto bignum;
}