gnu.gcc.help
[Top] [All Lists]

Problems: gcc 4.1.0 as CrossCompiler

Subject: Problems: gcc 4.1.0 as CrossCompiler
From: Robert Hartmann
Date: Thu, 27 Jul 2006 19:00:07 +0200
Newsgroups: gnu.gcc.help
Hi there,

My Problem in short words:
I can't build gcc as a Crosscompiler
on Linux(Debian) to PowerPC or MIPS
because the make process doesn't come to an end,
it hangs up.

More precisely:

What I want to do:
In a practical experiment I have to
take a look at the assembler output
for MIPS 4kc, ARM 7 and PowerPC 440
generated by gcc 4.1.0.
To compare gcc's output to the output
of other compilers.


I downloaded the arm-elf-gcc as tar.gz
from http://www.mikrocontroller.net/en/arm-gcc
I tested to get Assemblercode out of a c-code-file
with this crosscompiler and it works fine.


But for MIPS and PowerPC I couldn't find
any ready to use Crosscompiler, which is downloadable
as archive.
That's why I tried to build the Crosscompilers
by myself out of the sources. But I failed.

My first step was to download
  Binutils 2.16.1
+ GCC 4.1.0
+ Newlib 1.14.0
+ GDB 6.4

and I saved them to /mnt/hda7/XCompiler/Download
(my hda7 is a Windows FAT32 partition)

then I extracted the archives to /mnt/hda7/XCompiler/src
with

cd /mnt/hda7/XCompiler/src

gunzip < ../Download/binutils-2.16.1.tar.gz | tar xvf -
gunzip < ../Download/gcc-4.1.0.tar.gz | tar xvf -
gunzip < ../Download/newlib-1.14.0.tar.gz | tar xvf -
gunzip < ../Download/gdb-6.4.tar.gz | tar xvf -


Now I tried to make the XCompiler linux->PowerPC:
Here are the steps for creating binutils:

1)  mkdir /mnt/hda7/XCompiler/src/build-powerpc &&
    cd /mnt/hda7/XCompiler/src/build-powerpc

2)  mkdir binutils && cd binutils

3) now the configure-step:
/mnt/hda7/XCompiler/src/binutils-2.16.1/configure --target=powerpc-eabi --prefix=/usr/local/powerpc --enable-interwork --enable-multilib -v

4) make -w

5) su -c "make install"

Until now everything runs fine without any error-messages

Now the steps for the gcc:

6) cd /mnt/hda7/XCompiler/src/build-powerpc
7) mkdir gcc && cd gcc

8) /mnt/hda7/XCompiler/src/gcc-4.1.0/configure --target=powerpc-eabi --prefix=/usr/local/powerpc --enable-interwork --enable-multilib --enable-languages="c,c++" --with-newlib -v

Perhaps the trick is to use some different compiler options?
Or perhaps I should use some more options or some less.
But which? Anyone has some suggestions?


9) make -w  2>&1 | tee make.out

After 24h hours without coming to an end I stopped make.

The last two lines (line 1069 and 1070) in make.out are

updating cache ../config.cache
configure: creating ./config.status

It probably hangs somewhere there, but I don't know why.
Anyone has an idea?

Debian is running on a Laptop (Intel Pentium 3 , 700 MHz, 384 MB RAM)
and gcc --version said gcc(GCC) 3.3.5 (Debian 1:3.3.5-3)

[By the way, I hope that I chose the right target for PowerPC 440...
Which target should I take for MIPS 4kc? ]

Can anyone help me please?

Thanks in advance,
 Robert

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy