« Return to Thread: problem with GCJ while running java code

Re: problem with GCJ while running java code

by Andrew Haley :: Rate this Message:

Reply to Author | View in Thread

gforgcc wrote:

>
>
> Andrew Haley wrote:
>> Build gcc in a clean directory with --with-sysroot= pointing at your ARM
>> root filesystem:
>>
>> /home/aph/gcc/trunk/configure --prefix=/local/x-arm-gcc/install \
>> --with-sysroot=/local/x-arm-gcc/rootfs-f8 --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
>>
>> make
>>
>>
>
> Hi Andrew
> i faced some problems while building when i tried the above steps what you
> told.. Here is the log of the error messages..(I have configured with the
> options as you have told above.)
>
> current directory is /home/developer/downloads/build_dir
>
> ../gcc-4.0.1/configure --prefix=/home/developer/downloads/install_gcc_dir
> --with-sysroot=/home/developer/downloads/rootfs-f8 --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
>
> and then did a make in the /home/developer/downloads/build_dir
>
> after sometime it gave these error messages...
>
>
>         HEADERS="ansidecl.h" DEFINES="" \
>         /bin/sh ../../gcc-4.0.1/gcc/mkconfig.sh tconfig.h
> /home/developer/downloads/build_dir/gcc/xgcc
> -B/home/developer/downloads/build_dir/gcc/
> -B/home/developer/downloads/install_gcc_dir/arm-linux-gnueabi/bin/
> -B/home/developer/downloads/install_gcc_dir/arm-linux-gnueabi/lib/ -isystem
> /home/developer/downloads/install_gcc_dir/arm-linux-gnueabi/include -isystem
> /home/developer/downloads/install_gcc_dir/arm-linux-gnueabi/sys-include -O2
> -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I.
> -I../../gcc-4.0.1/gcc -I../../gcc-4.0.1/gcc/.
> -I../../gcc-4.0.1/gcc/../include -I../../gcc-4.0.1/gcc/../libcpp/include  
> -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions
> -fno-zero-initialized-in-bss -fno-unit-at-a-time  \
>            -c ../../gcc-4.0.1/gcc/crtstuff.c -DCRT_BEGIN \
>           -o crtbegin.o
> /tmp/cc4Kl0Qv.s: Assembler messages:
> /tmp/cc4Kl0Qv.s:36: Error: junk at end of line, first unrecognized character

You're picking up the assembler for your host machine, not the cross-assembler
for your target.

When you run configure, make sure that your target binutils are in the PATH.
Alternatively, you can use --with-ld=, --with-as=, etc.

The output of configure will tell you which ld, as, etc. it's using.  Make sure
these are the target versions.

Andrew.

 « Return to Thread: problem with GCJ while running java code