public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Updating powerpc-crosscompile environment from gcc-2.95.3
@ 2005-11-09 20:08 Frank Beesley
  2005-11-09 21:22 ` Kai Ruottu
  2005-11-10 17:02 ` Frank Beesley
  0 siblings, 2 replies; 11+ messages in thread
From: Frank Beesley @ 2005-11-09 20:08 UTC (permalink / raw)
  To: gcc-help; +Cc: kmustone

Kimmo,

I am trying something very similar. I am trying to use binutils-2.15, 
gcc  gcc-4.0.1, glibc-2.3.5 all for the Freescale MPC5200 (603e core).

Your config:
../gcc-4.0.2/configure --target=powerpc-linux --with-cpu=603e --nfp 
--prefix=/tmp/cross --enable-shared --enable-languages="c" --with-newlib 
--disable-threads

--> try --disable-shared because on the first gcc build you do not yet 
have libraries to share.


My config:
PREFIX=/opt/ppc
TARGET=powerpc-motorola-linux
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:$PREFIX/bin

"../gcc-4.0.1/configure --prefix=$PREFIX --target=$TARGET --disable-nls 
--disable-shared --enable-languages=c --without-headers --with-newlib"

"make"

I get farther then the message you have but it still fails with:
checking for powerpc-motorola-linux-gcc...  /rpm/ppc/build/gcc/gcc/xgcc 
-B/rpm/ppc/build/gcc/gcc/ -B/opt/ppc/powerpc-motorola-linux/bin/ 
-B/opt/ppc/powerpc-motorola-linux/lib/ -isystem 
/opt/ppc/powerpc-motorola-linux/include -isystem 
/opt/ppc/powerpc-motorola-linux/sys-include
checking for C compiler default output file name... configure: error: C 
compiler cannot create executables

Note:
- I do have logs if anyone wants to see them.
- I have also added the "--with-cpu=603e" option and get the same error.

Frank Beesley


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Updating powerpc-crosscompile environment from gcc-2.95.3
@ 2005-11-05 13:53 Kimmo Mustonen
  0 siblings, 0 replies; 11+ messages in thread
From: Kimmo Mustonen @ 2005-11-05 13:53 UTC (permalink / raw)
  To: gcc-help

Hello!

I have a working powerpc-linux cross-compiling setup using binutils 2.16.1 
and gcc-2.95.3 on i386. Unfortunately I should upgrade it because

a) this gcc version works for building kernel 2.4 but not kernel 2.6
b) this gcc version works on i386 host but x86_64 host is not supported

I have tried to upgrade to gcc versions 3.0, 3.4.3, 3.4.4, 4.0.0 and 4.0.2 
but haven't been able to get any of them built but it fails quite early 
stage (the first step while still using newlib).

The log files contain the build scripts upto this stage:

1) A working version using gcc-2.95.3:

http://users.tkk.fi/u/kmustone/cross2953.log.txt

2) A non-working version using gcc-4.0.2 complaining about for 
instance pthread.h being missing. Configure, however, does not notice this 
problem or does not care about it (does not automatically use 
--disable-threads):

http://users.tkk.fi/u/kmustone/cross402.log.txt

3) A non-working version using gcc-4.0.2 --disable-threads. Looks quite 
promising until crti.o is missing.

http://users.tkk.fi/u/kmustone/cross402disablethreads.log.txt

"...powerpc-linux/bin/ld: crti.o: No such file: ..."

Where should this file come from? If not from gcc itself, the only other 
possible source at this point is binutils, but it is the same version that 
is working with gcc-2.95.3. If from gcc, why doesn't it get built or why 
isn't it found? There are some crti.asm or crti.s files under 
gcc-4.0.2/gcc/config/* but didn't see any obvious PowerPC-version 
there.

The build script used for gcc-4.0.2:

---8<---8<---
#!/bin/sh
set -e
mkdir -p /tmp/cross
mkdir -p /tmp/cross/src
cd /tmp/cross/src
bzip2 -dc /m/nfs/data/readwrite/sipo-external/binutils-2.16.1.tar.bz2 \
     | tar -xf -
cd binutils-2.16.1
./configure --target=powerpc-linux --prefix=/tmp/cross --nfp
make TARGET_CONFIGDIRS=
make install
PATH=/tmp/cross/bin:$PATH
export PATH
cd /tmp/cross/src
bzip2 -dc /m/nfs/data/readwrite/sipo-external/gcc-4.0.2.tar.bz2 \
     | tar -xf -
mkdir -p gcc-4.0.2-obj
cd gcc-4.0.2-obj
../gcc-4.0.2/configure --target=powerpc-linux --with-cpu=603e --nfp \
     --prefix=/tmp/cross --enable-shared --enable-languages="c" \
     --with-newlib --disable-threads
make TARGET_CONFIGDIRS=
---8<---8<---

Essentially the same steps work for gcc-2.95.3 but not any later version.

The host system is i386 Fedora Core 1 using linux kernel 2.4.31 but I have 
also other host environments that don't work any better.

Any suggestions?

Regards,
Kimmo Mustonen

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-11-10 17:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-09 20:08 Updating powerpc-crosscompile environment from gcc-2.95.3 Frank Beesley
2005-11-09 21:22 ` Kai Ruottu
2005-11-09 21:33   ` corey taylor
2005-11-09 22:17     ` Kai Ruottu
2005-11-09 22:24     ` Kai Ruottu
2005-11-09 22:18   ` Frank Beesley
2005-11-10  9:24     ` Kai Ruottu
2005-11-10  9:58       ` Kai Ruottu
2005-11-10 10:16       ` Kai Ruottu
2005-11-10 17:02 ` Frank Beesley
  -- strict thread matches above, loose matches on Subject: below --
2005-11-05 13:53 Kimmo Mustonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).