From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18852 invoked by alias); 13 Jun 2011 09:13:12 -0000 Received: (qmail 18836 invoked by uid 22791); 13 Jun 2011 09:13:11 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_GC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jun 2011 09:12:54 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5D9CsNp007098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 Jun 2011 05:12:54 -0400 Received: from zebedee.pink (ovpn-113-116.phx2.redhat.com [10.3.113.116]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5D9CptB021054; Mon, 13 Jun 2011 05:12:51 -0400 Message-ID: <4DF5D492.3020409@redhat.com> Date: Mon, 13 Jun 2011 09:41:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10 MIME-Version: 1.0 To: "gc@linux.hpl.hp.com" CC: java-patches@gcc.gnu.org, gcc-patches@gcc.gnu.org, Joel Sherrill , Jie Liu Subject: Fwd: Have a boehm-gc patch for gcj/rtems References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00964.txt.bz2 On 12/06/11 16:45, Jie Liu wrote: > Hi, > > Java HelloWorld compiled by cross gcj for RTEMS can run without > problem now, I think it's time for get the boehm-gc patch reviewed and > merged. :) Here is the patch: > > Index: mach_dep.c > =================================================================== > --- mach_dep.c (revision 172224) > +++ mach_dep.c (working copy) > @@ -411,7 +411,8 @@ > word dummy; > > # if defined(USE_GENERIC_PUSH_REGS) > -# ifdef HAVE_BUILTIN_UNWIND_INIT > +# if defined(HAVE_BUILTIN_UNWIND_INIT)\ > + &&!(defined(I386) && defined(RTEMS)) > /* This was suggested by Richard Henderson as the way to */ > /* force callee-save registers and register windows onto */ > /* the stack. */ > @@ -437,8 +438,8 @@ > for (; (char *)i < lim; i++) { > *i = 0; > } > -# if defined(MSWIN32) || defined(MSWINCE) \ > - || defined(UTS4) || defined(LINUX) || defined(EWS4800) > +# if defined(MSWIN32) || defined(MSWINCE) || defined(UTS4) \ > + || defined(LINUX) || defined(EWS4800) || defined(RTEMS) > (void) setjmp(regs); > # else > (void) _setjmp(regs); > Index: include/private/gcconfig.h > =================================================================== > --- include/private/gcconfig.h (revision 172224) > +++ include/private/gcconfig.h (working copy) > @@ -315,6 +315,11 @@ > # define mach_type_known > # endif > # endif > +# if defined(__rtems__) && (defined(i386) || defined(__i386__)) > +# define I386 > +# define RTEMS > +# define mach_type_known > +# endif > # if defined(NeXT) && defined(mc68000) > # define M68K > # define NEXT > @@ -1297,6 +1302,17 @@ > # define STACKBOTTOM ((ptr_t)0xc0000000) > # define DATAEND /* not needed */ > # endif > +# ifdef RTEMS > +# define OS_TYPE "RTEMS" > +# include > + extern int etext[]; > + extern int end[]; > + void *rtems_get_stack_bottom(); > +# define InitStackBottom rtems_get_stack_bottom() > +# define DATASTART ((ptr_t)etext) > +# define DATAEND ((ptr_t)end) > +# define STACKBOTTOM ((ptr_t)InitStackBottom) > +# endif > # ifdef DOS4GW > # define OS_TYPE "DOS4GW" > extern long __nullarea; > @@ -2370,7 +2386,8 @@ > # else > # if defined(NEXT) || defined(DOS4GW) || \ > (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \ > - (defined(SUNOS5) && !defined(USE_MMAP)) > + (defined(SUNOS5) && !defined(USE_MMAP)) || \ > + defined(RTEMS) > # define GET_MEM(bytes) HBLKPTR((size_t) \ > calloc(1, (size_t)bytes > + GC_page_size) \ > + GC_page_size-1) > Index: configure > =================================================================== > --- configure (revision 172224) > +++ configure (working copy) > @@ -14867,6 +14867,8 @@ > $as_echo "#define _REENTRANT 1" >>confdefs.h > > ;; > + rtems) > + ;; > decosf1 | irix | mach | os2 | dce | vxworks) > as_fn_error "thread package $THREADS not yet supported" "$LINENO" 5 > ;; > Index: os_dep.c > =================================================================== > --- os_dep.c (revision 172224) > +++ os_dep.c (working copy) > @@ -1507,7 +1507,7 @@ > > # if !defined(OS2) && !defined(PCR) && !defined(AMIGA) \ > && !defined(MSWIN32) && !defined(MSWINCE) \ > - && !defined(MACOS) && !defined(DOS4GW) > + && !defined(MACOS) && !defined(DOS4GW) && !defined(RTEMS) > > # ifdef SUNOS4 > extern caddr_t sbrk(); > > Best Regards, > Jie > > 2011/6/4 Jie Liu : >> Hi, >> >> I am working on porting gcj to rtems now, it's a project of GSoC2011.[1] >> And now, the first step: boehm-gc have been ported, so I want to get >> this patch reviewed and merged. >> >> And I have filed the FSF Paperwork, the patch has been attached. >> Thank you for your time. >> >> Best Regards, >> Jie >> >> [1]http://socghop.appspot.com/gsoc/org/google/gsoc2011/rtems >>