Subject: Re: kern/12298: fairly impressive cross-compilation bogon in sys/lib/libsa/tftp.c
To: None <>
From: Chris G. Demetriou <>
List: netbsd-bugs
Date: 02/28/2001 16:25:42 writes:
> 	i still wonder why #ifdef _STANDALONE is needed.
> 	- native compilation should go fine with <arpa/tftp.h>
> 	- cross compilation should supply netbsd includes, so it should
> 	  go fine with <arpa/tftp.h>
> 	(i think the above is what the PR says)

That would be correct, but for the fact that the stuff which builds
libsa bits typically uses -nostdinc.  So (regardless of whether or not
you're using a cross-compilation or hosted envirionment) you're not
gonna get those includes.

Maybe the boot blocks should be like lots of other things, and use
-nostdinc -I${DESTDIR}/usr/include (or whatever) if doing a DESTDIR
build.  Doing that is probably the right thing, but could have fairly
catastrophic impact on non-DESTDIR builds.

Doing that would also allow you to nuke all of the grotty code in the
boot blocks that makes 'machine' and ${MACHINE_ARCH} symlinks...

(another problem i have with the current MD boot block goop is, what
are programs like 'installboot'?  Are they host programs, part of the
host tool set you might want in a cross-compilation environment?  Or
are they binaries built for the target system?  Of course, the answer
is, in fact, "both."  The same is true with at least a few other
programs in the source tree...)