public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* cannot successfully compile gcc - xgcc cannot create executables
@ 2000-12-06  1:17 John Kozubik
  2000-12-06  4:45 ` Kai Ruottu
  0 siblings, 1 reply; 2+ messages in thread
From: John Kozubik @ 2000-12-06  1:17 UTC (permalink / raw)
  To: crossgcc

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.  Basically just need to compile 
and install binutils and gcc with those settings, but I have the following 
problems:


./configure --target=mips-mips-ecoff \
--prefix=/usr/home/john/n64-devel/gnu \
--program-prefix="/usr/home/john/n64-devel/gnu/mips-mips-ecoff/bin/" \
--with-headers=/usr/include \
--with-gnu-as --with-gnu-ar --with-gnu-ld

(this config line produces no errors)

make LANGUAGES=c

and it sits there making for about 20 mins, and eventually gets to here and 
dies:

checking for a BSD compatible install... /usr/bin/install -c
checking how to run the C preprocessor... /usr/home/john/gcc-2.95.2/gcc/xgcc
-B/usr/home/john/gcc-2.95.2/gcc/
-B/usr/home/john/n64-devel/gnu/mips-mips-ecoff/bin/ -E
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether the C compiler (/usr/home/john/gcc-2.95.2/gcc/xgcc
-B/usr/home/john/gcc-2.95.2/gcc/
-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.
*** Error code 1


Any ideas?  the key error is at the end - C compiler cannot create
executables.  It is trying to run xgcc with those args ... and
can't, I guess.

I went to that dir and tried to run the new xgcc
(/usr/home/john/gcc-2.95.2/gcc/), and it says 'no input files' so obviously
it does work...so what the heck?

Any ideas appreciated.

--john

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com


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

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

* Re: cannot successfully compile gcc - xgcc cannot create executables
  2000-12-06  1:17 cannot successfully compile gcc - xgcc cannot create executables John Kozubik
@ 2000-12-06  4:45 ` Kai Ruottu
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Ruottu @ 2000-12-06  4:45 UTC (permalink / raw)
  To: John Kozubik; +Cc: crossgcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2688 bytes --]

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

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

end of thread, other threads:[~2000-12-06  4:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-06  1:17 cannot successfully compile gcc - xgcc cannot create executables John Kozubik
2000-12-06  4:45 ` Kai Ruottu

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