[BUG: trunk]arm-linux$B8~$1%/%m%9%3%s%Q%$%k;~$N%(%i!<(B

e$B<G$H?=$7$^$9!%e(B

i686-linuxe$B$+$ie(Barm-linuxe$B8~$1$K%/%m%9%3%s%Q%$%k$r$7$h$&$H$7$?$H$3$m!$e(B
gc.he$B!$e(Bgc.ce$B!$e(Bthread_pthread.ce$B$Ne(B3e$B$D$N%U%!%$%k$G%3%s%Q%$%k%(%i!<$r3NG’$7$^e(B
e$B$7$?!%e(B
e$B%-%c%9%H$d%^%/%m$NDj5A!$4X?t$N@k8@$K$A$g$C$H$7$?%_%9$,$"$k$h$&$G$9!%e(B

e$B%/%m%9%3%s%Q%$%i$Oe(BCodeSourcerye$B$5$s$N$b$N$r;HMQ$7$F$$$^$9!%e(B
http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite

% ./configure --target=arm-linux --host=arm-linux
–with-baseruby=ruby-1.9.2-dev CC=arm-none-linux-gnueabi-gcc
LD=arm-none-linux-gnueabi-gcc AR=arm-none-linux-gnueabi-ar
RANLIB=arm-none-linux-gnueabi-ranlib

%make
gc.c:1186: error: conflicting types for ‘ruby_get_stack_grow_direction’
gc.h:69: note: previous declaration of ‘ruby_get_stack_grow_direction’
was here
gc.c: In function ‘mark_current_machine_context’:
gc.c:2118: error: ‘start’ undeclared (first use in this function)
gc.c:2118: error: (Each undeclared identifier is reported only once
gc.c:2118: error: for each function it appears in.)
gc.c:2118: error: ‘end’ undeclared (first use in this function)
gc.c: In function ‘rb_gc_mark_machine_stack’:
gc.c:2225: error: ‘start’ undeclared (first use in this function)
gc.c:2225: error: ‘end’ undeclared (first use in this function)

thread_pthread.c: In function ‘get_stack’:
thread_pthread.c:224: error: invalid use of void expression

e$B0J2<$N%Q%C%A$G%3%s%Q%$%k$ODL$j$^$7$?!%e(B

Index: thread_pthread.c

— thread_pthread.c (revision 27328)
+++ thread_pthread.c (working copy)
@@ -190,7 +190,7 @@
#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, a, b)
#else
#define STACK_GROW_DIR_DETECTION VALUE stack_grow_dir_detection
-#define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, a,
b)
+#define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection,
(a), (b))
#endif

#if defined HAVE_PTHREAD_GETATTR_NP || defined HAVE_PTHREAD_ATTR_GET_NP
@@ -221,7 +221,7 @@

endif

if (pthread_attr_getguardsize(&attr, &guard) == 0) {
STACK_GROW_DIR_DETECTION;

  • STACK_DIR_UPPER((void)0, *addr = (char *)*addr + guard);
  • STACK_DIR_UPPER((void *)0, *addr = (char *)*addr + guard);
    *size -= guard;
    }

else

Index: gc.c

— gc.c (revision 27328)
+++ gc.c (working copy)
@@ -2099,7 +2099,7 @@
#elif STACK_GROW_DIRECTION > 0
#define GET_STACK_BOUNDS(start, end, appendix) (start = STACK_START, end
= STACK_END+appendix)
#else
-#define GET_STACK_BOUNDS(stack_start, stack_end, appendix)
+#define GET_STACK_BOUNDS(start, end, appendix)
((STACK_END < STACK_START) ?
(start = STACK_END, end = STACK_START) : (start = STACK_START, end =
STACK_END+appendix))
#endif
Index: gc.h

— gc.h (revision 27328)
+++ gc.h (working copy)
@@ -66,7 +66,7 @@

define STACK_UPPER(x, a, b) b

#else
RUBY_EXTERN int ruby_stack_grow_direction;
-int ruby_get_stack_grow_direction(VALUE *addr);
+int ruby_get_stack_grow_direction(volatile VALUE *addr);

define stack_growup_p(x) ( \

(ruby_stack_grow_direction ?
ruby_stack_grow_direction : \

e$B$J$+$@$G$9!#e(B

At Tue, 13 Apr 2010 21:40:07 +0900,
Satoshi Shiba wrote in [ruby-dev:40973]:

thread_pthread.c: In function ‘get_stack’:
thread_pthread.c:224: error: invalid use of void expression

e$B$3$l$O0J2<$N$h$&$K$7$F$bDL$j$^$9$+e(B?

Index: thread_pthread.c

— thread_pthread.c (revision 27335)
+++ thread_pthread.c (working copy)
@@ -222,5 +222,5 @@ get_stack(void **addr, size_t *size)
if (pthread_attr_getguardsize(&attr, &guard) == 0) {
STACK_GROW_DIR_DETECTION;

  • STACK_DIR_UPPER((void)0, *addr = (char *)*addr + guard);
  • STACK_DIR_UPPER((void)0, (void)(*addr = (char *)*addr + guard));
    *size -= guard;
    }

e$B%A%1%C%He(B #3145 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

This issue was solved with changeset r27338.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


http://redmine.ruby-lang.org/issues/show/3145

e$B<G$H?=$7$^$9!%e(B

Nobuyoshi N. wrote:

*size -= guard;
}

trunke$B$,>e5-$N$h$&$KJQ99$5$l$F$$$?$N$G!$%S%k%I$7$F$_$?$H$3$m!$e(B
e$BLdBj$J$/DL$j$^$7$?!%e(B