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]

Re: cannot successfully compile gcc - xgcc cannot create executables


John Kozubik wrote:
> I am trying to build a gcc setup to run on my x86 based freeBSD dev machine 
> that will let me compile mips-mips-ecoff.
> 
> --with-headers=/usr/include \

 Nintendo-64 is not a FreeBSD-based system, please use Nintendo-64 headers and
libs, where ever you then may get them...

> -B/usr/home/john/n64-devel/gnu/mips-mips-ecoff/bin/ -g -O2 ) works... no
> configure: error: installation or configuration problem: C compiler cannot
> create executables.
>
> Any ideas?  the key error is at the end - C compiler cannot create
> executables.

 Excuse me, but this "What will be needed for a working C-compiler"-question
should have been answered in all preliminary books about "C". Ie. a C-compiler
needs headers (the '.h' files), at least one startup (crt0.o), a C-library
(libc.a) and perhaps a linker script before it can create any executables for
the target system...

 You have now a somehow working compiler (the 'libgcc.a' compiled using your
native FreeBSD headers) in the 'gcc' subdir, but it fails when trying to
check the sanity of your compiler toolchain. You haven't headers and libs
for your target (Nintendo-64), and you should have had these BEFORE starting
to build GCC, or had known how on earth you will succeed without them...

 The GCC-manual is a nice source of information... The "Installation / Cross-
Compiler" says :

------------------------ clip ----------------------------------------------
Steps of Cross-Compilation

To compile and run a program using a cross-compiler involves several steps:

· Run the cross-compiler on the host machine to produce assembler files for
  the target machine.  This requires header files for the target machine.

· Assemble the files produced by the cross-compiler.  You can do this either
  with an assembler on the target machine, or with a cross-assembler on the
  host machine.

· Link those files to make an executable.  You can do this either with a linker
  on the target machine, or with a cross-linker on the host machine.  Whichever
  machine you use, you need libraries and certain startup files (typically
  crt....o) for the target machine.
------------------------ clip ----------------------------------------------

 Before you can build the libs (libgcc.a, libiberty.a and libstdc++.a) for
your target, you must have the C-headers for the target. Building the 'libiberty'
needs information about what functions are missing from your target C-library
(libc.a). So the sanity check before trying it...

Cheers, Kai


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


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