This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Configuration patch for i386-unknown-freebsd
- To: java-patches at gcc dot gnu dot org
- Subject: Configuration patch for i386-unknown-freebsd
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Wed, 2 May 2001 22:00:04 -0500 (CDT)
- Reply-to: rittle at rsch dot comm dot mot dot com
This patch is based upon this comment by Bryce McKinlay
<bryce@waitaki.otago.ac.nz>
> This can be set on a per-platform basis in boehm-gc/configure.in and
> libjava/configure.in by explicitly setting the THREADLIBS flag. Maybe
> Alex Oliva's threads configuration patch can be extended to provide a
> THREADLIBS flag globally?
This is the only configuration patch required to allow boehm-gc to
build on i386-unknown-freebsd (--enable-threads=posix --enable-libgcj)
but it is obviously not a complete solution yet. I notice that
important FreeBSD patches are already in versions of the Boehm
collector beyond the version in the gcc tree. Should I attempt to see
which ones fix problems, or should I assume that the gcc tree will
upgrade at some point in the near future?
BTW, I think the warning is better than failing to compile since many
people will want to add --enable-threads=posix for other parts of the
gcc tree and I think we want to encourage people to build with Java
enabled.
Bootstrapped on i386-unknown-freebsd4.2 on mainline. Confirmed to now
get past entire build in boehm-gc. A separate patch will be submitted
to handle configuration in libjava for this platform. I can apply it
myself, if approved.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/boehm-gc/configure.in,v
retrieving revision 1.22
diff -c -r1.22 configure.in
*** configure.in 2001/04/26 04:29:38 1.22
--- configure.in 2001/05/03 02:18:34
***************
*** 42,57 ****
*-*-linux*)
AC_DEFINE(LINUX_THREADS)
AC_DEFINE(_REENTRANT)
;;
*-*-solaris*)
AC_DEFINE(SOLARIS_THREADS)
AC_DEFINE(_SOLARIS_PTHREADS)
;;
*-*-irix*)
AC_DEFINE(IRIX_THREADS)
;;
esac
- THREADLIBS=-lpthread
;;
decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
AC_MSG_ERROR(thread package $THREADS not yet supported)
--- 42,65 ----
*-*-linux*)
AC_DEFINE(LINUX_THREADS)
AC_DEFINE(_REENTRANT)
+ THREADLIBS=-lpthread
;;
+ *-*-freebsd*)
+ AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
+ AC_DEFINE(FREEBSD_THREADS)
+ INCLUDES=-pthread
+ THREADLIBS=-pthread
+ ;;
*-*-solaris*)
AC_DEFINE(SOLARIS_THREADS)
AC_DEFINE(_SOLARIS_PTHREADS)
+ THREADLIBS=-lpthread
;;
*-*-irix*)
AC_DEFINE(IRIX_THREADS)
+ THREADLIBS=-lpthread
;;
esac
;;
decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
AC_MSG_ERROR(thread package $THREADS not yet supported)