From: Andrew Haley <aph@redhat.com>
To: "gc@linux.hpl.hp.com" <gc@linux.hpl.hp.com>
Cc: java-patches@gcc.gnu.org, gcc-patches@gcc.gnu.org,
Joel Sherrill <joel.sherrill@oarcorp.com>,
Jie Liu <lj8175@gmail.com>
Subject: Fwd: Have a boehm-gc patch for gcj/rtems
Date: Mon, 13 Jun 2011 09:41:00 -0000 [thread overview]
Message-ID: <4DF5D492.3020409@redhat.com> (raw)
In-Reply-To: <BANLkTikPSAdNWLEKm3OG_Vv8OZP+n=h-D+PA=vjdWBN41xQeOQ@mail.gmail.com>
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 <sys/unistd.h>
> + 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 <lj8175@gmail.com>:
>> 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
>>
prev parent reply other threads:[~2011-06-13 9:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-04 11:57 Jie Liu
2011-06-12 16:27 ` Jie Liu
2011-06-13 9:41 ` Andrew Haley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DF5D492.3020409@redhat.com \
--to=aph@redhat.com \
--cc=gc@linux.hpl.hp.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=java-patches@gcc.gnu.org \
--cc=joel.sherrill@oarcorp.com \
--cc=lj8175@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).