Subject: Re: problem building gcc4 on sparc64 / netbsd-4
To: None <tech-toolchain@netbsd.org>
From: S.P.Zeidler <spz@serpens.de>
List: tech-toolchain
Date: 09/02/2006 08:47:00
Hi,

if you see the following:

Thus wrote S.P.Zeidler (spz@serpens.de):

> for some weird reason my sparc64 doesn't want to build a gcc4; using
> HAVE_GCC=3 it could build itself a netbsd-4 (as of yesterday),
> but the resulting system can't build itself the default gcc while
> running "./build.sh tools"; it fails doing dependall in
> /home/netbsd/src4/src/tools/gcc.
> 
> Maybe somebody here spots something unusual? I'm including an excerpt
> of the build log, the full build log is at
> http://serpens.de/~spz/build.tools
> 
> [starting excerpt]
> cc -c   -O -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute  -Wno-error  -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/home/netbsd/src4/src/tools/gcc/../../gnu/dist/gcc4/gcc -I/home/netbsd/src4/src/tools/gcc/../../gnu/dist/gcc4/gcc/build -I/home/netbsd/src4/src/tools/gcc/../../gnu/dist/gcc4/gcc/../include -I/home/netbsd/src4/src/tools/gcc/../../gnu/dist/gcc4/gcc/../libcpp/include  -DNETBSD_TOOLS   -o build/insn-conditions.o insn-conditions.c
> /home/netbsd/src4/src/tools/gcc/../../gnu/dist/gcc4/gcc/config/sparc/sparc.md:1840: error: `flag_pic' undeclared here (not in a function)
> /home/netbsd/src4/src/tools/gcc/../../gnu/dist/gcc4/gcc/config/sparc/sparc.md:1840: error: `flag_pic' undeclared here (not in a function)
> /home/netbsd/src4/src/tools/gcc/../../gnu/dist/gcc4/gcc/config/sparc/sparc.md:1841: error: initializer element is not constant

check if obj/tools/gcc/build/gcc/options.h is empty. If it is, hunt down
the gawk in your path and make sure it doesn't get found by the build.
The gcc build prefers gawk, but won't work with it.

regards,
	spz
-- 
spz@serpens.de (S.P.Zeidler)