From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30531 invoked by alias); 12 Jun 2011 15:45:41 -0000 Received: (qmail 30516 invoked by uid 22791); 12 Jun 2011 15:45:40 -0000 X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_GC,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jun 2011 15:45:24 +0000 Received: by gxk3 with SMTP id 3so1948747gxk.20 for ; Sun, 12 Jun 2011 08:45:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.80.105 with SMTP id j69mr5679704yhe.428.1307893523308; Sun, 12 Jun 2011 08:45:23 -0700 (PDT) Received: by 10.146.84.6 with HTTP; Sun, 12 Jun 2011 08:45:23 -0700 (PDT) In-Reply-To: References: Date: Sun, 12 Jun 2011 16:27:00 -0000 Message-ID: Subject: Re: Have a boehm-gc patch for gcj/rtems From: Jie Liu To: java-patches@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Joel Sherrill Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00946.txt.bz2 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 =3D 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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, =A0so 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 >