public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "dsdsdds at 126 dot com" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug libgcj/40868]  New: ecjx.cc should be compiled by host gcc
Date: Mon, 27 Jul 2009 03:54:00 -0000	[thread overview]
Message-ID: <bug-40868-17989@http.gcc.gnu.org/bugzilla/> (raw)

gcc version: 4.4.1 with gcc-4.4.1-branch_update-1.patch
host system: Ubuntu 9.04 x86_64

configured by:
     ./configure --prefix=/usr --build=x86_64-linux-gnu \
        --host=x86_64-linux-gnu \
        --target=arm-none-linux-gnueabi --with-sysroot=$TOOLCHAIN_DIR \
        --with-gmp=$STATIC_LIB_DIR --with-mpfr=$STATIC_LIB_DIR \
        --disable-multilib --disable-nls --enable-shared \
        --enable-__cxa_atexit --enable-c99 --enable-long-long \
        --enable-threads=posix --enable-languages=c,c++,java \
        --with-float=soft --with-cpu=arm926ej-s \
        --enable-libgcj-bc --disable-sjlj-exceptions \
        --with-ecj-jar=/source/ecj.jar
compiled by:
     make AS_FOR_TARGET=arm-none-linux-gnueabi-as
LD_FOR_TARGET=arm-none-linux-gnueabi-ld

error message:
     architecture of input file `ecjx.o' is incompatible with i386:x86_64
output 

I solved this error message as follows:
First chdir to 'arm-none-linux-gnueabi/libjava',
then run 'gcc ecjx.cc -o ecjx.o'
then run 'make AS_FOR_TARGET=arm-none-linux-gnueabi-as
LD_FOR_TARGET=arm-none-linux-gnueabi-ld' and no more error happens, and the
toolchain works without problem.

This error is because ecjx.cc is compiled by arm-none-linux-gnueabi-gcc, not by
gcc. I think that libjava/Makefile.in should be changed, as 

diff -Narup gcc-4.4.1.origin/libjava/Makefile.in gcc-4.4.1/libjava/Makefile.in
--- gcc-4.4.1.origin/libjava/Makefile.in        2009-07-22 15:43:59.000000000
+0800
+++ gcc-4.4.1/libjava/Makefile.in       2009-07-27 08:40:50.702375251 +0800
@@ -9739,6 +9739,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE)
$(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<

+ecjx.o:
+       gcc -c -o $@ $<
+
 .cc.o:
 @am__fastdepCXX_TRUE@  depbase=`echo $@ | sed
's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
 @am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c
-o $@ $<; \


-- 
           Summary: ecjx.cc should be compiled by host gcc
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dsdsdds at 126 dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: arm-none-linux-gnueabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40868


             reply	other threads:[~2009-07-27  3:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27  3:54 dsdsdds at 126 dot com [this message]
2009-09-01 12:04 ` [Bug libgcj/40868] " ramana at gcc dot gnu dot org
2009-09-01 14:06 ` aph at gcc dot gnu dot org
2009-09-01 16:58 ` tromey at gcc dot gnu dot org
2009-09-01 17:09 ` aph at gcc dot gnu dot org
2009-09-01 21:38 ` jakub at gcc dot gnu dot org
2009-12-04 12:54 ` flameeyes at gentoo dot org
2009-12-10 15:25 ` ramana at gcc dot gnu dot org
2010-07-10  8:56 ` bugtrack at roumenpetrov dot info
2010-07-10  8:57 ` bugtrack at roumenpetrov dot info
2010-08-27  4:27 ` rwild at gcc dot gnu dot org
2010-08-27  4:30 ` rwild at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-40868-17989@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).