Hello, Java is not supported for the amd64--freebsd targets, essentially because of lacking support in boehm-gc. I created a simple patch to do so : - no credits to me: most of this is directly inspired by the official freebsd-port of boehm-gc - tested for over 6 months on a non-graphical application with long-lasting scientific calculations (mixing C++, Fortran and Java code) Concerning the patch : - the boehm-gc/include/gc_cpp.h-diff is only to quiet the compiler, - the GC_parallel-diff in boehm-gc/pthread_support.c is not amd64--freebsd specific, but I did not test without it. Thanx for your great work.
Created attachment 10578 [details] Add support for amd64--freebsd
I forgot to mention : correct libjava testsuite results : === libjava Summary === # of expected passes 3964 # of unexpected failures 24 # of expected failures 10 # of untested testcases 26 FAIL: cxxtest.cc compilation FAIL: PR16923.c compilation Running /files/home/scito/.scito/tools/gcc41-branch/gcc/libjava/testsuite/libjav a.lang/lang.exp ... FAIL: PR18699 execution - gij test FAIL: PR18699 execution - gij test WARNING: program timed out. FAIL: Process_1 execution - gij test WARNING: program timed out. FAIL: Process_1 execution - gij test WARNING: program timed out. FAIL: Process_2 execution - gij test WARNING: program timed out. FAIL: Process_2 execution - gij test WARNING: program timed out. FAIL: Process_3 execution - gij test WARNING: program timed out. FAIL: Process_3 execution - gij test WARNING: program timed out. FAIL: Process_4 execution - gij test WARNING: program timed out. FAIL: Process_5 execution - gij test WARNING: program timed out. FAIL: Process_6 execution - gij test WARNING: program timed out. FAIL: Process_6 execution - gij test FAIL: Thread_Interrupt output - gij test FAIL: Thread_Interrupt output - gij test FAIL: Thread_Wait_Interrupt output - bytecode->native test FAIL: Thread_Wait_Interrupt -O3 output - source compiled test FAIL: Throw_2 execution - source compiled test FAIL: Throw_2 execution - gij test FAIL: Throw_2 execution - bytecode->native test FAIL: Throw_2 -O3 execution - source compiled test FAIL: Throw_2 execution - gij test FAIL: Throw_2 -O3 execution - bytecode->native test
Confirmed, patches go to gcc-patches@ and java-patches@.
You may want to send the GC patch upstream, to the GC list.
Created attachment 11950 [details] take-II this one works at -head as well Bon, apparently I'm (almost) the only one who uses gcj on freebsd-amd64, but here's another patch; the basic differences with the first one are removal of unneeded diffs (apart non-tested gcconfig.h support for freebsd-[arm|powerpc]) and explicitly using FREEBSD_STACKBOTTOM as well as GC_FreeBSDGetDataStart(). === libjava Summary === # of expected passes 6887 # of unexpected failures 21 # of expected failures 12 # of untested testcases 28 Failures are : FAIL: PR16923.c FAIL: PR27908 FAIL: Throw_2
Created attachment 12480 [details] Take III Most of the original patch probably has been commited when adding support for GNU/kFreeBSD. However, this final small patch is still needed to actually recognise freebsd-amd64 and correctly build and run boehm-gc when --enable-libgcj is given
Is this patch still relevant as is? I'd like to ask our Java developers to have a look, but it would be good if you (as the original submitter) could verify and, if needed, provide a patch against our current development tree. Thanks!
Since January commits to boehm-gc for handling amd64/x86-64 cpu under GNU/kFreeBSD, I confirm that libgcj-support is OK for x86_64*freebsd IMHO this PR can be closed I propose a last 'patch' to hook it by default on the build
Created attachment 14201 [details] No longer exclude libgcj on x86_64.
Fixed.