This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [Gc] Re: boehm-gc merge for GCC
- From: Matthias Klose <doko at ubuntu dot com>
- To: GCC Java <java at gcc dot gnu dot org>
- Cc: Bryce McKinlay <bmckinlay at gmail dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Sun, 02 Dec 2012 03:50:53 +0100
- Subject: Re: [Gc] Re: boehm-gc merge for GCC
- References: <1353097280.505328435@f161.mail.ru> <50A67667.7020600@ubuntu.com> <CAF1jjLucRudE2a3gCZq6erkJKfs1nC+DicM+4f4moXJ5HPy9g@mail.gmail.com> <1353099257.140499471@f123.mail.ru> <CAF1jjLsA1nzLaJejMiAfzqZZ8btw37n0B3H7_qz-UrLvNQGqzA@mail.gmail.com> <50A6EE27.4000605@ubuntu.com> <50ABADE0.9000305@redhat.com> <50B385C5.6010004@ubuntu.com> <CALUNu-p3muXCwGV9sRSF550EvyM2=f0=mbEzDEhtf=BdhUJKMQ@mail.gmail.com> <CALUNu-pkdM8xXrJoCuJTW41zn0BiHntQLzC8=sLuHR2DbHVjbw@mail.gmail.com> <50BA6D7D.8020106@ubuntu.com>
Am 01.12.2012 21:50, schrieb Matthias Klose:
> Am 26.11.2012 18:03, schrieb Bryce McKinlay:
>> 2012 at 3:07 PM, Matthias Klose <doko@ubuntu.com> wrote:
>
>>> So if the merge looks that problematic, maybe restart with trunk, maybe
>>> check it in as bdwgc, and have toplevel configury to decide which one to use
>>> until the update is stable, and then just drop the boehm-gc directory?
>>
>>
>> I'm not sure it's worth making it configure-time switchable. I'd just put it
>> on a branch, make sure it's working on the major platforms, and then merge
>> to trunk once the GCC tree goes back in to stage 1.
>
> ok. so I'll use
>
> - branches/boehm for the import of the bdwgc branch
> - branches/gcj/bdwgc-20121125-merge for the merge proposal
>
> I'll start with what I currently have, and probably leave the libjava build on
> the branch broken for some time. At least its stage1 material. Instead I'll
> give the classpath merge priority, still considering it worth having for the 4.8
> release.
now committed all patches, which I think were ready for commit. an outstanding
hack is
Index: boehm.cc
===================================================================
--- boehm.cc (Revision 194043)
+++ boehm.cc (Arbeitskopie)
@@ -53,9 +53,24 @@
#ifdef THREAD_LOCAL_ALLOC
# define GC_REDIRECT_TO_LOCAL
-# include <gc_local_alloc.h>
+# if 0
+# include <gc_local_alloc.h>
+# else
+# if 0
+# define GC_MALLOC(s) GC_LOCAL_MALLOC(s)
+# define GC_MALLOC_ATOMIC(s) GC_LOCAL_MALLOC_ATOMIC(s)
+# ifdef GC_GCJ_SUPPORT
+# undef GC_GCJ_MALLOC
+# define GC_GCJ_MALLOC(s,d) GC_LOCAL_GCJ_MALLOC(s,d)
+# endif
+# endif
+# endif
#endif
+ int GC_is_thread_suspended (pthread_t);
+ void GC_suspend_thread (pthread_t);
+ void GC_resume_thread (pthread_t);
+
// From boehm's misc.c
void GC_enable();
void GC_disable();
plus, there are a few more undefined references when built from the branch. Most
likely some bits locally to GCC and not upstreamed:
libtool: link: /home/packages/gcc/svn/build2/./gcc/gcj
-B/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/
-B/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/
-B/home/packages/gcc/svn/build2/./gcc/
-B/home/packages/gcc/svn/install2/x86_64-linux-gnu/bin/
-B/home/packages/gcc/svn/install2/x86_64-linux-gnu/lib/ -isystem
/home/packages/gcc/svn/install2/x86_64-linux-gnu/include -isystem
/home/packages/gcc/svn/install2/x86_64-linux-gnu/sys-include -m32 -ffloat-store
-fomit-frame-pointer -Usun -g -O2 -m32 -m32 -o .libs/gij -shared-libgcc
-L/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs
-L/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava ./.libs/libgij.so
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so
-lpthread -ldl -lrt -Wl,-rpath -Wl,/home/packages/gcc/svn/install2/lib/../lib32
-Wl,-rpath -Wl,/home/packages/gcc/svn/install2/lib/../lib32/gcj-4.8.0-14
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_pthread_create'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_gcj_malloc'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_resume_thread'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_pthread_sigmask'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_gcj_debug_kind'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_suspend_thread'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_is_thread_suspended'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_gcj_kind'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_dlopen'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_local_malloc_atomic'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_local_gcj_malloc'
/home/packages/gcc/svn/build2/x86_64-linux-gnu/32/libjava/.libs/libgcj.so:
undefined reference to `GC_init_gcj_malloc'
collect2: error: ld returned 1 exit status
make[5]: *** [gij] Error 1
I'll leave the state of the branch as it is now, focusing on the classpath
merge. please feel free to commit fixes to the merge branch including a mail to
java-patches.
Thanks, Matthias