This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch for Preview: Cross-Configury Tweaks
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Sun, 23 Feb 2003 10:50:31 -0600
- Subject: Patch for Preview: Cross-Configury Tweaks
- Reply-to: gnustuff at thisiscool dot com
Ranjit,
Here is a patch which is essentially your original patch:
http://gcc.gnu.org/ml/java-patches/2003-q1/msg00126.html
plus the removal of the native build check as per:
http://gcc.gnu.org/ml/java/2003-02/msg00174.html
which fixes the cross-compilation issue.
I took the liberty of putting your name on this and
adding one line in the ChangeLog. Can you approve
or disapprove this?
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
2003-01-20 Ranjit Mathew <rmathew at hotmail dot com>
* configure.in: Use "with_cross_host" to check if we are
being built with a cross-compiler.
Add ac_cv_exeext to the file name used in a native build
to check if gcj has been built alongside.
Use this gcj only if it is not a crossed-native build,
otherwise assume cross-compiling gcj for the target is in
the path.
Eliminate native build check when building libltdl
* configure: Rebuilt.
* Makefile.am: Use cross-compiling gcjh from the path for
a crossed-native build.
* Makefile.in: Rebuilt.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.264.2.10
diff -u -2 -r1.264.2.10 Makefile.am
--- Makefile.am 12 Feb 2003 20:00:03 -0000 1.264.2.10
+++ Makefile.am 23 Feb 2003 15:24:11 -0000
@@ -53,8 +53,9 @@
## found in the build tree.
ZIP = $(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar
+GCJH = gcjh
else
ZIP = jar
+GCJH = $(target_alias)-gcjh
endif
-GCJH = gcjh
else # CANADIAN
GCJH = $(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh
Index: configure.in
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/configure.in,v
retrieving revision 1.142.4.6
diff -u -2 -r1.142.4.6 configure.in
--- configure.in 20 Feb 2003 09:12:24 -0000 1.142.4.6
+++ configure.in 23 Feb 2003 15:24:38 -0000
@@ -24,16 +24,14 @@
AM_CONFIG_HEADER(include/config.h gcj/libgcj-config.h)
-# Only use libltdl for native builds.
-if test -z "${with_cross_host}"; then
- AC_LIBLTDL_CONVENIENCE
- AC_LIBTOOL_DLOPEN
- DIRLTDL=libltdl
- AC_DEFINE(USE_LTDL)
- # Sigh. Libtool's macro doesn't do the right thing.
- INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
- # FIXME: this is a hack.
- sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
- ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
-fi
+AC_LIBLTDL_CONVENIENCE
+AC_LIBTOOL_DLOPEN
+DIRLTDL=libltdl
+AC_DEFINE(USE_LTDL)
+# Sigh. Libtool's macro doesn't do the right thing.
+INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
+# FIXME: this is a hack.
+sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
+ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
+
AC_SUBST(INCLTDL)
AC_SUBST(LIBLTDL)
@@ -472,5 +470,5 @@
AC_SUBST(gcc_version)
-if test "x${with_newlib}" = "xyes"; then
+if test -n "${with_cross_host}"; then
# We are being configured with a cross compiler. AC_REPLACE_FUNCS
# may not work correctly, because the compiler may not be able to
@@ -735,7 +733,14 @@
changequote([,])
fi
- if test -x "${builddotdot}/../../gcc/gcj"; then
- dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`"
- GCJ="$dir/gcj -B`${PWDCMD-pwd}`/ -B$dir/"
+ if test -x "${builddotdot}/../../gcc/gcj${ac_cv_exeext}"; then
+ if test x"$build" = x"$host"; then
+ dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`"
+ GCJ="$dir/gcj -B`${PWDCMD-pwd}`/ -B$dir/"
+ else
+ # Crossed-native build (host=target and host!=build)
+ CANADIAN=yes
+ NULL_TARGET=no
+ GCJ="${target_alias}-gcj -B`${PWDCMD-pwd}`/"
+ fi
else
CANADIAN=yes