Subject: gcc4 cross-build not quite right yet
To: None <current-users@netbsd.org>
From: Andrew Reilly <andrew-netbsd@areilly.bpc-users.org>
List: current-users
Date: 06/25/2006 10:44:51
Hi all,

The introduction of gcc4 seems to have solved the
amd64-unknown-freebsd61 unsupported problem that I reported last
week, but something in the new gcc4 framework is picking up a
system header, rather than a NetBSD src/include header, I think:

    compile  backend/ggc-none.lo
In file included from /usr/home/andrew/rtos-comp/netbsd/src/gnu/dist/gcc4/gcc/system.h:396,
                 from /usr/home/andrew/rtos-comp/netbsd/src/gnu/dist/gcc4/gcc/ggc-none.c:32:
/usr/include/malloc.h:3:2: #error "<malloc.h> has been replaced by <stdlib.h>"

*** Failed target:  ggc-none.lo
*** Failed command: cc -O -I. -I/usr/home/andrew/rtos-comp/netbsd/src/gnu/usr.bin/gcc4/backend/../arch/i386 -DIN_GCC -DHAVE_CONFIG_H -I/usr/home/andrew/rtos-comp/netbsd/src/gnu/dist/gcc4/gcc -I/usr/home/andrew/rtos-comp/netbsd/src/gnu/dist/gcc4/gcc/. -I/usr/home/andrew/rtos-comp/netbsd/src/gnu/dist/gcc4/gcc/../include -I/usr/home/andrew/rtos-comp/netbsd/src/gnu/dist/gcc4/gcc/../libcpp/include -I/usr/home/andrew/rtos-comp/netbsd/src/gnu/usr.bin/gcc4/backend/.. -c -o ggc-none.lo.o /usr/home/andrew/rtos-comp/netbsd/src/gnu/dist/gcc4/gcc/ggc-none.c
*** Error code 1

Stop.
nbmake: stopped in /usr/home/andrew/rtos-comp/netbsd/src/gnu/usr.bin/gcc4/backend

Should there be a -nostdinc on that command line somewhere?

Cheers,

-- 
Andrew