public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* target of cross compile : problem in make (newbie)
@ 2004-03-24 11:36 sting sting
  2004-03-24 15:29 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: sting sting @ 2004-03-24 11:36 UTC (permalink / raw)
  To: gcc-help

Hello,

I had installed gcc 3.3.2 from gcc-3.3.2.tar.bz2 on a Linux (x86) RedHat 9 
machine.

I want to use it to compile a project so it will run on powerpc.

when I try

./configure --target=powerpc-*-elf
I get the follwoing error:
"./configure: No match."

So I had tried to choose "1" instead of "*":

./configure --target=powerpc-1-elf


and I got :

Configuring for a i686-pc-linux-gnu host.
*** This configuration is not supported in the following subdirectories:
     target-libffi target-boehm-gc target-zlib target-libjava
    (Any other directories should still work fine.)

but the configure succeeded .

First , what is the meaning of the "1" I had entered ?
(It aso works with
./configure --target=powerpc-2-elf
./configure --target=powerpc-3-elf
....


afterwards, when running make I get the following error:


gcc -c -g -O2      -gnatpg -gnata -I- -I. -Iada -I./ada ada/sdefault.adb -o 
ada/sdefault.o
gnatbind -C -I- -I. -Iada -I./ada -o ada/b_gnat1.c -n ada/gnat1drv.ali
fatal error: file gnat1drv.ali is incorrectly formatted
make sure you are using consistent versions of gcc/gnatbind
4.
     |
make[1]: *** [ada/b_gnat1.c] Error 4
make[1]: Leaving directory `/home/rami/src/gcc-3.3.2/gcc'
make: *** [all-gcc] Error 2


(I have binutils-2.13.90.0.18-9)

any idea?

regards,
sting

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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

* Re: target of cross compile : problem in make (newbie)
  2004-03-24 11:36 target of cross compile : problem in make (newbie) sting sting
@ 2004-03-24 15:29 ` Ian Lance Taylor
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2004-03-24 15:29 UTC (permalink / raw)
  To: sting sting; +Cc: gcc-help

"sting sting" <zstingx@hotmail.com> writes:

> ./configure --target=powerpc-*-elf
> I get the follwoing error:
> "./configure: No match."

First of all, never use ./configure.  Always build in a different
directory.

Secondly, just use powerpc-elf, not powerpc-*-elf.

So, you want somethig like
    ../gcc/configure --target=powerpc-elf

I assume you saw the '*' in configure scripts doing a switch on
target.  That is a shell pattern on the canonical name.  Don't confuse
that with the name you use for a target.

No idea on your Ada problem, but it may be related to running
configure in the source directory.

Ian

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

* Re: target of cross compile : problem in make (newbie)
  2004-03-24 19:24 sting sting
@ 2004-03-24 20:26 ` Ian Lance Taylor
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2004-03-24 20:26 UTC (permalink / raw)
  To: sting sting; +Cc: gcc-help

"sting sting" <zstingx@hotmail.com> writes:

> if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
> /home/ffami/src/build-gcc/gcc/xgcc -B/home/ffami/src/build-gcc/gcc/
> -B/usr/local/powerpc-elf/bin/ -B/usr/local/powerpc-elf/lib/ -isystem
> /usr/local/powerpc-elf/include -O2  -DIN_GCC -DCROSS_COMPILE   -W
> -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> -isystem ./include  -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
> -Dinhibit_libc -I. -I. -I../../gcc-3.3.2/gcc
> -I../../gcc-3.3.2/gcc/. -I../../gcc-3.3.2/gcc/config
> -I../../gcc-3.3.2/gcc/../include  -mrelocatable-lib -mno-eabi
> -mstrict-align -DL_muldi3 -c ../../gcc-3.3.2/gcc/libgcc2.c -o
> libgcc/./_muldi3.o
> as: unrecognized option `-mppc'
> make[2]: *** [libgcc/./_muldi3.o] Error 1
> make[2]: Leaving directory `/home/ffami/src/build-gcc/gcc'
> make[1]: *** [stmp-multilib] Error 2
> make[1]: Leaving directory `/home/ffami/src/build-gcc/gcc'
> make: *** [all-gcc] Error 2
> 
> Any idea?
> any help will be appreciated.

You are building a cross-compiler, so you need a cross-assembler.  gcc
didn't find a cross-assembler, so it tried to use the native assembler
on your system, which failed.

Building a cross-compiler is a slightly tedious exercise.  I'm afraid
I can't help you walk through it.  I think there are various FAQs out
there on how to do it.

Ian

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

end of thread, other threads:[~2004-03-24 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-24 11:36 target of cross compile : problem in make (newbie) sting sting
2004-03-24 15:29 ` Ian Lance Taylor
2004-03-24 19:24 sting sting
2004-03-24 20:26 ` Ian Lance Taylor

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).