This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
multilib fixes for libjava
- From: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 4 Nov 2006 16:23:54 -0500
- Subject: multilib fixes for libjava
Could anyone comment on the following? Geoff introduced
fixes in r117741 to allow multilib builds on 32-bit PowerPC
processors on Darwin PPC. However the necessary changes for the
libjava subdirectory were never introduced. I have been
attempting to fix this by modelling a patch after the changes
done for configure.ac and Makefile.in in the libobjc directory...
http://gcc.gnu.org/viewcvs/trunk/libobjc/configure.ac?r1=110182&r2=117741
http://gcc.gnu.org/viewcvs/trunk/libobjc/Makefile.in?r1=117618&r2=117741
and regenerating the configure files with...
cd libjava
aclocal -I . -I .. -I ../config
autoconf -I . -I .. -I ../config
automake -a
cd classpath
aclocal -I m4 -I ../.. -I ../../config
autoconf -I m4 -I ../.. -I ../../config
automake -a
cd ../libltdl
aclocal -I ../.. -I ../../config
autoconf -I ../.. -I ../../config
automake -a
cd ..
cd ..
So far the patch looks like...
--- gcc/libjava/configure.ac.org 2006-11-04 08:49:05.000000000 -0500
+++ gcc/libjava/configure.ac 2006-11-04 09:25:25.000000000 -0500
@@ -15,27 +15,8 @@
# We may get other options which we don't document:
# --with-target-subdir, --with-multisrctop, --with-multisubdir
-# When building with srcdir == objdir, links to the source files will
-# be created in directories within the target_subdir. We have to
-# adjust toplevel_srcdir accordingly, so that configure finds
-# install-sh and other auxiliary files that live in the top-level
-# source directory.
-if test "${srcdir}" = "."; then
- if test -z "${with_target_subdir}"; then
- toprel=".."
- else
- if test "${with_target_subdir}" != "."; then
- toprel="${with_multisrctop}../.."
- else
- toprel="${with_multisrctop}.."
- fi
- fi
-else
- toprel=".."
-fi
-
-libgcj_basedir=$srcdir/$toprel/./libjava
-AC_SUBST(libgcj_basedir)
+# Find the rest of the source tree framework.
+AM_ENABLE_MULTILIB(, ..)
AC_CANONICAL_SYSTEM
_GCC_TOPLEV_NONCANONICAL_BUILD
@@ -74,16 +55,6 @@
[version_specific_libs=no]
)
-# Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
- AS_HELP_STRING([--enable-multilib],
- [build many library versions (default)]),
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
AC_ARG_ENABLE(plugin,
AS_HELP_STRING([--enable-plugin],
[build gcjwebplugin web browser plugin]),
@@ -905,7 +876,7 @@
AM_CONDITIONAL(USING_GCC, test "$GCC" = yes)
# We're in the tree with gcc, and need to include some of its headers.
-GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
+GCC_UNWIND_INCLUDE='-I$(multi_basedir)/./libjava/../gcc'
if test "x${with_newlib}" = "xyes"; then
# We are being configured with a cross compiler. AC_REPLACE_FUNCS
@@ -1518,7 +1489,7 @@
case " $CONFIG_FILES " in
*" Makefile "*)
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
- ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
+ ac_file=Makefile . ${multi_basedir}/./libjava/../config-ml.in
;;
esac
for ac_multi_file in $CONFIG_FILES; do
@@ -1534,7 +1505,7 @@
with_multisubdir=${with_multisubdir}
ac_configure_args="${multilib_arg} ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-libgcj_basedir=${libgcj_basedir}
+multi_basedir=${multi_basedir}
CC="${CC}"
CXX="${CXX}"
ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
--- gcc/libjava/Makefile.in.org 2006-11-04 09:16:49.000000000 -0500
+++ gcc/libjava/Makefile.in 2006-11-04 09:18:12.000000000 -0500
@@ -665,7 +665,7 @@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
-libgcj_basedir = @libgcj_basedir@
+multi_basedir = @multi_basedir@
mandir = @mandir@
With these changes, the multilib build on a G4 dies at...
checking for dladdr in -ldl... yes
checking for /proc/self/exe... configure: error: cannot check for file existence when cross compiling
Do any of you see anything obiviously wrong in the configure.ac and Makefile.in changes? It wasn't
straightforward how I should map Geoff's changes to libjava since you use libgcj_basedir instead of
toplevel_srcdir. Thanks in advance for any advice as I am pretty much stuck at this point.
Jack
ps I also patch...
--- gcc-4.2-20061031/libjava/libltdl/Makefile.am.org 2006-11-03 18:10:46.000000000 -0500
+++ gcc-4.2-20061031/libjava/libltdl/Makefile.am 2006-11-03 18:11:12.000000000 -0500
@@ -2,6 +2,8 @@
AUTOMAKE_OPTIONS = no-dependencies foreign
+ACLOCAL_AMFLAGS = -I ../.. -I ../../config
+
INCLUDES = $(GCINCS)
if INSTALL_LTDL
to make sure that the ACLOCAL_AMFLAGS is properly set for finding the new
multi.m4 file Geoff added.