This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
3.4 PATCH: Fix libltdl compilation failure on Tru64 UNIX
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: java-patches at gcc dot gnu dot org
- Cc: Roger Sayle <roger at eyesopen dot com>
- Date: Sat, 2 Aug 2003 00:13:21 +0200 (MEST)
- Subject: 3.4 PATCH: Fix libltdl compilation failure on Tru64 UNIX
Roger pointed out in private mail that my patches to enable pthreads
support on Tru64 UNIX broke bootstrap for libjava/libltdl in the same way
originally described in PR bootstrap/9330:
libjava/libltdl/ltdl.c now includes pthread.h via gc.h, but without
_REENTRANT is defined before.
This is due to the following problem: boehm-gc sets INCLUDES to
-I .../boehm-gc/include -pthread on Tru64 UNIX, but only saves $DEFS in
boehm-cflags.
Both libjava/configure.in and libjava/libltdl/configure.in construct the -I
part themselves, thus missing the -pthread.
The following patch fixes this by removing this duplication/inconsistency:
INCLUDES is emitted to boehm-cflags and picked from there. As Roger found
out, the strange INCLUDES=$INCLUDES assignment in boehm-gc/configure.in is
necessary to make the value available to config.status which creates
boehm-cflags.
The patch bootstrapped for him alphaev67-dec-osf5.1 (all languages except
Ada). I'm just running a bootstrap on alpha-dec-osf4.0f myself.
Ok for mainline if it passes?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Thu Jul 31 22:39:29 2003 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
Roger Sayle <roger@eyesopen.com>
boehm-gc:
* configure.in: Save $INCLUDES in boehm-cflags, too.
Set INCLUDES so it's available to config.status.
* configure: Regenerate.
libjava:
* configure.in: Don't initialize GCINCS to boehm-gc/include.
* configure: Regenerate.
libjava/libltdl:
* configure.in: Don't initialize GCINCS to boehm-gc/include.
* Regenerate.
Index: boehm-gc/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/configure.in,v
retrieving revision 1.48
diff -u -p -r1.48 configure.in
--- boehm-gc/configure.in 28 Jul 2003 04:18:20 -0000 1.48
+++ boehm-gc/configure.in 1 Aug 2003 22:00:53 -0000
@@ -436,8 +436,8 @@ else
fi
AC_OUTPUT(Makefile include/Makefile, [
-dnl Put all the -D options in a file.
-echo "$DEFS" > boehm-cflags
+dnl Put all the -I and -D options in a file.
+echo "$INCLUDES $DEFS" > boehm-cflags
if test -n "$CONFIG_FILES"; then
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
@@ -453,4 +453,5 @@ gc_basedir=${gc_basedir}
CC="${CC}"
ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
DEFS="$DEFS"
+INCLUDES="$INCLUDES"
)
Index: libjava/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.164
diff -u -p -r1.164 configure.in
--- libjava/configure.in 1 Aug 2003 16:17:33 -0000 1.164
+++ libjava/configure.in 1 Aug 2003 22:01:07 -0000
@@ -375,13 +375,12 @@ case "$GC" in
boehm)
AC_MSG_RESULT(boehm)
GCLIBS=../boehm-gc/libgcjgc_convenience.la
- GCINCS='-I$(top_srcdir)/../boehm-gc/include'
JC1GCSPEC='-fuse-boehm-gc'
GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
dnl We also want to pick up some cpp flags required when including
dnl boehm-config.h. Yuck.
- GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
+ GCINCS="`cat ../boehm-gc/boehm-cflags`"
GCOBJS=boehm.lo
GCHDR=boehm-gc.h
dnl The POSIX thread support needs to know this.
Index: libjava/libltdl/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/libltdl/configure.in,v
retrieving revision 1.5
diff -u -p -r1.5 configure.in
--- libjava/libltdl/configure.in 3 Jul 2001 22:33:24 -0000 1.5
+++ libjava/libltdl/configure.in 1 Aug 2003 22:01:10 -0000
@@ -47,8 +47,7 @@ changequote([,])
GCINCS=
if test "$GC" = "boehm"; then
- GCINCS='-I$(top_srcdir)/../../boehm-gc/include'
- GCINCS="$GCINCS `cat ../../boehm-gc/boehm-cflags`"
+ GCINCS="`cat ../../boehm-gc/boehm-cflags`"
AC_DEFINE(HAVE_BOEHM_GC)
fi
AC_SUBST(GCINCS)