From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13589 invoked by alias); 27 Jul 2009 03:54:56 -0000 Received: (qmail 13393 invoked by uid 48); 27 Jul 2009 03:54:43 -0000 Date: Mon, 27 Jul 2009 03:54:00 -0000 Subject: [Bug libgcj/40868] New: ecjx.cc should be compiled by host gcc X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dsdsdds at 126 dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg02135.txt.bz2 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