Re: problem with GCJ while running java code

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
Cesc wrote:
> 
> Andrew Haley wrote:
>>
>> Works for me.  Maybe you have an old version of as?  What does
>>
>>   as -version?
>>
>> say?  
>>
>> What does
>>
>>   arm-linux-gnueabi-gcj -verbose -save-temps -oecj1
>> --main=org.eclipse.jdt.internal.compiler.batch.GCCMain ecj.jar
>>
>> say?
>>
>> Andrew.
>>
>>
> 
> Hi, 
> 
> I did 
> 
> ./arm-linux-gnueabi-gcj --verbose -save-temps -oecj1
> --main=org.eclipse.jdt.internal.compiler.batch.GCCMain ecj.jar
> 
> and it says 
> 
> Using built-in specs.
> Reading specs from
> /root/tmp/f8/install/lib/gcc/arm-linux-gnueabi/4.4.0/../../../../arm-linux-gnueabi/lib/libgcj.spec
> rename spec startfile to startfileorig
> rename spec lib to liborig
> Target: arm-linux-gnueabi
> Configured with: ../configure --prefix=/root/tmp/f8/install
> --with-sysroot=/mnt/new --disable-libssp --disable-libgomp
> --disable-libmudflap --enable-libgcj --disable-bootstrap --disable-multilib
> --disable-static --disable-sjlj-exceptions --target=arm-linux-gnueabi
> --enable-languages=c,c++,java
> --with-build-time-tools=/root/tmp/buildroot/build_arm/staging_dir/usr/arm-linux-uclibcgnueabi/bin
> --disable-libstdcxx-debug
> Thread model: posix
> gcc version 4.4.0 20080411 (experimental) (GCC)
> COLLECT_GCC_OPTIONS='-v' '-save-temps' '-oecj1'
> '-fbootclasspath=./:/root/tmp/f8/install/share/java/libgcj-4.4.0.jar' '-g1'
> '-shared-libgcc'
> COLLECT_GCC_OPTIONS='-v' '-save-temps' '-oecj1'
> '-fbootclasspath=./:/root/tmp/f8/install/share/java/libgcj-4.4.0.jar' '-g1'
> '-shared-libgcc'
>  /root/tmp/f8/install/libexec/gcc/arm-linux-gnueabi/4.4.0/jc1 ecj.jar
> -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc
> -fkeep-inline-functions -quiet -dumpbase ecj.jar -auxbase ecj -g1 -version
> -fbootclasspath=./:/root/tmp/f8/install/share/java/libgcj-4.4.0.jar
> -faux-classpath ecj.zip -o ecj.s
> GNU Java (GCC) version 4.4.0 20080411 (experimental) (arm-linux-gnueabi)
>         compiled by GNU C version 4.1.3 20070929 (prerelease) (Ubuntu
> 4.1.2-16ubuntu2), GMP version 4.2.1, MPFR version 2.3.1.
> GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
> Class path starts here:
>     ecj.zip/ (zip)
>     ./ (system)
>     /root/tmp/f8/install/share/java/libgcj-4.4.0.jar/ (system) (zip)
> COLLECT_GCC_OPTIONS='-v' '-save-temps' '-oecj1'
> '-fbootclasspath=./:/root/tmp/f8/install/share/java/libgcj-4.4.0.jar' '-g1'
> '-shared-libgcc'
>  as -meabi=4 -o ecj.o ecj.s
> as: unrecognized option `-meabi=4'
> 
> 
> 
> Which "as" are you referring to?
> 
> The one in my /usr/bin says:
> 
> GNU assembler (GNU Binutils for Ubuntu) 2.18
> Copyright 2007 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or later.
> This program has absolutely no warranty.
> This assembler was configured for a target of `i486-linux-gnu'.
> 
> while the one in my toolchain
> (/root/tmp/buildroot/build_arm/staging_dir/usr/arm-linux-uclibcgnueabi/bin
> says:
> 
> GNU assembler (GNU Binutils) 2.18
> Copyright 2007 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or later.
> This program has absolutely no warranty.
> This assembler was configured for a target of `arm-linux-uclibcgnueabi'.
> 
> 
>  I guess gcj is using the one from /usr/bin. Is this correct?

Obviously not, no:

> This assembler was configured for a target of `i486-linux-gnu'.

Ah, your gcc target and your as target don't match.  arm-linux-gnueabi and
arm-linux-uclibcgnueabi; this is bad.  It's really important to configure
binutils and gcc for the *same( target.

Anyway, you should be able to get it to work by making sure your PATH is set
correctly when builfing for ARM.

Andrew.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.