From patchwork Thu Aug 12 17:39:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: PR libgcj/40868 - ecjx should be build with host compiler From: Dmitrijs Ledkovs X-Patchwork-Id: 61632 Message-Id: <87eie34tnv.fsf@ubuntu.com> To: gcc-patches@gcc.gnu.org Cc: java-patches@gcc.gnu.org, tromey@redhat.com Date: Thu, 12 Aug 2010 20:39:32 +0300 This is a new attempt at the PR libgcj/40868 [1]. This time around a compiler variable is introduced in configure.ac and Makefile.am is patched as well. This has been tested with build/host=linux-gnu target=i686-w64-mingw32. This has not been tested with a canadian-cross but "it should just work". [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40868 >From 8f20bb45ffebbd2cdf4cfc640624a371851fce2b Mon Sep 17 00:00:00 2001 From: Dmitrijs Ledkovs Date: Wed, 7 Jul 2010 15:57:56 +0100 Subject: [PATCH 2/2] 2010-07-25 Dmitrijs Ledkovs PR libgcj/40868 * configure.ac: add GCC_FOR_ECJX variable * Makefile.am: use GCC_FOR_ECJX compiler to compile ecjx.o * Makefile.in: Regenerate. * configure: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. --- libjava/Makefile.am | 2 +- libjava/configure.ac | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 7b67ed0..8930903 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -1161,7 +1161,7 @@ endif else !NATIVE -ecjx_LINK = $(GCJ_FOR_ECJX_LINK) $(ecjx_LDFLAGS) +ecjx_LINK = $(GCC_FOR_ECJX) -c -o $(am_ecjx_OBJECTS) $(top_srcdir)/$(ecjx_SOURCES) && $(GCJ_FOR_ECJX_LINK) $(ecjx_LDFLAGS) ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) ecjx_LDADD = ecjx_DEPENDENCIES = diff --git a/libjava/configure.ac b/libjava/configure.ac index 125e9ce..06e6f96 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -395,6 +395,7 @@ NATIVE=yes which_gcj=default host_exeext=${ac_exeext} GCJ_FOR_ECJX= +GCC_FOR_ECJX= built_gcc_dir="`cd ${builddotdot}/../../${host_subdir}/gcc && ${PWDCMD-pwd}`" if test -n "${with_cross_host}"; then # We are being configured with a cross compiler. We can't @@ -402,6 +403,7 @@ if test -n "${with_cross_host}"; then NATIVE=no cross_host_exeext= GCJ_FOR_ECJX="${with_cross_host}-gcj" + GCC_FOR_ECJX="${with_cross_host}-gcc" case "${with_cross_host}" in *mingw* | *cygwin*) cross_host_exeext=.exe @@ -467,6 +469,7 @@ JAVAC="$GCJ -C" export JAVAC AC_SUBST(GCJ_FOR_ECJX) +AC_SUBST(GCC_FOR_ECJX) AC_SUBST(GCJH) AC_SUBST(host_exeext) -- 1.7.0.4