Subject: another go at cross-building netbsd-1-6 on a netbsd-4 host
To: NetBSD Toolchain and Build Technical Discussion List <tech-toolchain@NetBSD.org>
From: Greg A. Woods <woods@planix.com>
List: tech-toolchain
Date: 03/19/2007 21:59:01
--pgp-sign-Multipart_Mon_Mar_19_21:58:57_2007-1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

As I'll have a few 1.6 machines to support in the field for quite a
while into the future I'm trying to get my 1.6 source tree to
cross-build on a netbsd-4 box.

I seem to remember doing some hacks to fix one problem earlier, but now
on another try today I'm getting a new error here:

cc -DHAVE_CONFIG_H -I. -I/building/work/woods/m-NetBSD-1.6/tools/toolchain/=
../../gnu/dist/toolchain/gas -I. -D_GNU_SOURCE -I. -I/building/work/woods/m=
-NetBSD-1.6/tools/toolchain/../../gnu/dist/toolchain/gas -I../bfd -I/buildi=
ng/work/woods/m-NetBSD-1.6/tools/toolchain/../../gnu/dist/toolchain/gas/con=
fig -I/building/work/woods/m-NetBSD-1.6/tools/toolchain/../../gnu/dist/tool=
chain/gas/../include -I/building/work/woods/m-NetBSD-1.6/tools/toolchain/..=
/../gnu/dist/toolchain/gas/.. -I/building/work/woods/m-NetBSD-1.6/tools/too=
lchain/../../gnu/dist/toolchain/gas/../bfd -I/building/work/woods/m-NetBSD-=
1.6/tools/toolchain/../../gnu/dist/toolchain/gas/../intl -I../intl -DLOCALE=
DIR=3D"\"/build/woods/once/NetBSD-1.6.x-i386-i386-tools/share/locale\""   -=
W -Wall -O -c /building/work/woods/m-NetBSD-1.6/tools/toolchain/../../gnu/d=
ist/toolchain/gas/app.c
In file included from ./targ-cpu.h:1,
                 from /building/work/woods/m-NetBSD-1.6/tools/toolchain/../=
../gnu/dist/toolchain/gas/config/obj-elf.h:42,
                 from ./obj-format.h:1,
                 from /building/work/woods/m-NetBSD-1.6/tools/toolchain/../=
../gnu/dist/toolchain/gas/config/te-nbsd.h:24,
                 from ./targ-env.h:1,
                 from /building/work/woods/m-NetBSD-1.6/tools/toolchain/../=
../gnu/dist/toolchain/gas/as.h:624,
                 from /building/work/woods/m-NetBSD-1.6/tools/toolchain/../=
../gnu/dist/toolchain/gas/app.c:30:
/building/work/woods/m-NetBSD-1.6/tools/toolchain/../../gnu/dist/toolchain/=
gas/config/tc-i386.h:511: error: array type has incomplete element type
*** Error code 1

Stop.
nbmake: stopped in /build/woods/once/NetBSD-1.6.x-i386-i386-ppro-obj/buildi=
ng/work/woods/m-NetBSD-1.6/tools/toolchain/build/gas


That line is:

	extern const struct relax_type md_relax_table[];

So I'm guessing the definition for "struct relax_type" isn't in scope,
and indeed it's not in that file anywhere.  I find it in ../as.h and
../tc.h, but I'm not a GCC hacker and I don't know what the right fix
should be, nor do I understand why the same error doesn't occur when I
build the 1.6 source on a 1.6 host (though I've only done that on sparc
and alpha recently, not i386).

--=20
						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>       Secrets of the Weird <woods@weird.com>

--pgp-sign-Multipart_Mon_Mar_19_21:58:57_2007-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: rfwvozvFWUoJIDVJKiIBNo0oxgHv48V0

iQA/AwUBRf8/5WZ9cbd4v/R/EQIXdgCfdU6xnkZAvxzVRyPqHiUvPvxR918AnRmZ
frv/w/TAxzEnj45qp/IVXmqm
=knfe
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Mon_Mar_19_21:58:57_2007-1--