This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crosstool for native compiler on new system. (solved)


Hello, Steven!

Some time ago, we discussed my problems with crosstool getting
a native compiler for mpc8540.

In the meanwhile, I was able to work my way through lots of crashes and
problems I had with my old gcc-3.3.3 compiler which came with my
toolchain. Finally, I made it to build gcc-3.4.3 successfully with
a "two-iteration bootstrap":

For the first iteration I was fine with --enable-languages=c only.
otherwise it would have crashed with strange libstdc++-v3 issues like I had (see below):
`/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-
> 3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnusp
> e/libstdc++-v3'
> make: *** [all-target-libstdc++-v3] Error 2


In the second step I was able to --enable-languages=c,c++,objc
and from there, life seems much more easier.
So, I got this problems solved by manually doing this two-iteration
bootstrapping.

Now I am running gcc-3.4.3 / glibc-2.3.4 / binutils 2.15.96 / linux 2.6.11.6 (linux-headers-2.6.11.2) / Xorg-6.4.2 / Qt-3.3.4...
So, my toolchain seems to work really fine now.
All the xgcc crashes I had and lots of other issues came up
from a somehow broken toolchain in the beginning.
I recommend doing a (manual/partial) Linux-From-Scratch next time
to avoid the problems I had on my system.


Thanks to all of you for your assistance.

Best greets,

Clemens


Steven J. Magnani wrote:
Clemens -

I compared the snippet you sent against my own builds. Yours more
closely resembles my cross build than my native build. The cross build
uses the bootstrap gcc (xgcc) to compile the file; the native build uses
the installed compiler in my PATH (armv4tb-softfloat-linux-c++).

If you send me your scripts, .dat files, and any patches beyond the
stock crosstool-0.28-rc37 distribution, I will kick off a build here and
see where it leads.

No doubt about it, building these compilers is painful and certainly not
what pays the bills for most of us.

Steve

-----Original Message-----
From: Clemens Koller [mailto:clemens.koller@anagramm.de] Sent: Tuesday, February 08, 2005 7:30 AM
To: Steven J. Magnani; crossgcc@sources.redhat.com
Subject: Re: crosstool for native compiler on new system.



Hello, Steven!



The "error" might be spurious. The binutils build may have completed fine - it's possible that crosstoo.sh is 'test'ing something that isn't correct.

> My first suggestion would be to check and see what's in > /gnusperoot.

Okay, as far as I understand, it is looking for ld in the gnusperoot
folder, which is not present at that time. I don't know if it needs to
be there at that time or not:

------8<-----same as yesterday--------------------------------------
 > + cd ..
 > + test -x /gnusperoot//usr/powerpc-linux-gnuspe/bin/ld
 > + abort Build failed during binutils
 > + echo Build failed during binutils
 > Build failed during binutils
 > + exec false
------8<------------------------------------------------------------


If the build did indeed fail, my next suggestion would be
to try without --nounpack.


Okay, several hours later, I tried exactly the same thing without
--nounpack demo-e500-cross.sh followed by demo-e500-native.sh:

Then it stops pretty late in demo-e500-native.sh at:
------8<------------------------------------------------------------
/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3
.4.3-glibc-2.3.3/build-gcc/gcc/xgcc -shared-libgcc -B/home/clemens/cross/c
rosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3.4.3-glibc-2.3.3/buil
d-gcc/gcc/ -nostdinc++ -L/home/clemens/cross/crosstool-0.28-rc37/build/pow
erpc-linux-gnuspe/gcc-3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnuspe/n
of/libstdc++-v3/src -L/home/clemens/cross/crosstool-0.28-rc37/build/powerp
c-linux-gnuspe/gcc-3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnuspe/nof/
libstdc++-v3/src/.libs -B/opt/crosstool/powerpc-linux-gnuspe/bin/ -B/opt/c
rosstool/powerpc-linux-gnuspe/lib/ -isystem /opt/crosstool/powerpc-linux-gnuspe/include -isystem /opt/crosstool/powerpc-linux-gnuspe/sys-include -
msoft-float -fPIC -mstrict-align -I/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc
-3.4.3-glibc-2.3.3/build-gcc/powerpc-linu
x-gnuspe/nof/libstdc++-v3/include/powerpc-linux-gnuspe -I/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc
-3.4.3-glibc-2.3.3/
build-gcc/powerpc-linux-gnuspe/nof/libstdc++-v3/include -I/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc
-3.4.3-glibc-2.3.3
/gcc-3.4.3/libstdc++-v3/libsupc++ -O2 -g -O2 -g -O2 -D_GNU_SOURCE -msoft-float -fPIC -mstrict-align -fno-implicit-templates -Wall -W -Wwrite-strin
gs -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c /home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux
-gnuspe/gcc-3.4.3-glibc-2.3.3/gcc-3.4.3/libstdc++-v3/src/locale_init.cc -o locale_init.o >/dev/null 2>&1
make[6]: *** [locale_init.lo] Error 1
make[6]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-
3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnusp
e/nof/libstdc++-v3/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-
3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnusp
e/nof/libstdc++-v3'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-
3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnusp
e/nof/libstdc++-v3'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-
3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnusp
e/libstdc++-v3'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-
3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnusp
e/libstdc++-v3'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-
3.4.3-glibc-2.3.3/build-gcc/powerpc-linux-gnusp
e/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2
------8<------------------------------------------------------------


Then I tried to cd into ...build-gcc/powerpc-linux-gnuspe/nof/libstdc++-v3/src
and did a 'make all' which worked fine...
So I cannot really see why it stopped... with an EPERM?


But then I don't know how to finish the build. If I try to work without --nounpack I end up as yesterday (see above).
So - I got stuck again! :-*


Actually, I am really worried if all that work is really the straight way to migrate (completely replace) my gcc-3.3.3+binutils 2.14 without
FP support to the gcc-3.4.3+binutils 2.15 with e500/spe to get our own
code efficiently working on our target. Is there no easier way to
achieve that? Well, I am pretty new to compiling compilers and it's good
to learn while doing things (and to get help from others) but I run out of time to try things without being
sure if there is a valuable result in the end. Can you recommend me 'the
way' to go for... It doesn't need to be the fastest one, but I need to
get my work done. Is there any more literature to read beside
gcc.gnu.org/* and the little crossgcc-wiki?


Is there another way to get efficient code for the MPC8540?

Best greets, and thanks...


Clemens Koller _______________________________ R&D Imaging Devices Anagramm GmbH Rupert-Mayer-Str. 45/1 81379 Muenchen Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]