Trying to build a cross compiler from linux to netbsd...
Dick Munroe
munroe@csworks.com
Wed Jan 3 08:33:00 GMT 2001
At 1:03 AM -0200 1/3/01, Alexandre Oliva wrote:
>On Jan 3, 2001, Dick Munroe <munroe@csworks.com> wrote:
>
>> ../../egcs-1.0.3a/gcc/objc/runtime.h:31: stdio.h: No such file or
>> directory
>> ../../egcs-1.0.3a/gcc/objc/runtime.h:32: ctype.h: No such file or
>> directory
>
>You must have a copy of the C library headers of the target machine in
>order to build GCC. You should have pointed to them with the
>configure flag --with-headers.
Thanks for the pointer, that's helped a lot. I grabbed the NETBSD
compile tar from their distribution, use with-headers and with-libs
and have gotten farther, except that when building GCC, I get pretty
much through the compiler build procedure and get the following:
loading site script /dev/null
loading cache ./config.cache
checking for gcc... /home/egcs/gcc/xgcc -B/home/egcs/gcc/
checking whether the C compiler (/home/egcs/gcc/xgcc
-B/home/egcs/gcc/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
make[1]: *** [stmp-f2c.h] Error 1
make[1]: Leaving directory `/home/egcs/gcc'
make: *** [all-gcc] Error 2
So I try the compiler on a Hello world program and discover:
[root@linux egcs]# /home/egcs/gcc/xgcc -B/home/egcs/gcc/ -g -O2 foo.c
/home/usr/local/i386-unknown-netbsd/lib/crt0.o: file not recognized:
File format not recognized
collect2: ld returned 1 exit status
[root@linux egcs]# file /home/usr/local/i386-unknown-netbsd/lib/crt0.o
/home/usr/local/i386-unknown-netbsd/lib/crt0.o: ELF 32-bit LSB
relocatable, Intel 80386, version 1, not stripped
which would seem a little weird since the cross compiler ought to
know about the ELF stuff (or does EGCS 1.0.3 predate the ELF format?
In which case I'll have to go back to an earlier version of the
NetBSD release to get my libraries).
Anyway, I'm trying for a.out format under NetBSD and clearly this
isn't happening at the moment.
Any suggestions?
Dick Munroe
--
Dick Munroe (E) mailto:munroe@csworks.com
Cottage Software Works, Inc. (O) 617 901 9052
PMB 361 (F) 617 489 0328
464 Common St. (W) http://www.acornsw.com/
Belmont, Ma. 02478
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list