Building environment using system headers instead of the in-tree headers

Dimitry Andric dim at FreeBSD.org
Tue Oct 9 09:47:19 UTC 2012


On 2012-10-09 02:14, Xin Li wrote:
> Josh Paetzel recently discovered an interesting build issue with the
> current FreeBSD 'buildworld', where 'make buildworld' over a FreeBSD
> 9.0 tree on a FreeBSD 9.1 system will fail.
>
> As it turns out, this was caused by addition of xlocale functionality
> on FreeBSD 9.1, which uses macros and expects some new functions found
> in more recent FreeBSD releases.  On the other hand, we do not pass
> e.g. -I${.CURDIR}/../../include so the header is preferred than system
> header.

During which stage does this fail?  In the '4.2 building libraries' one?


> So an obvious way to get around this would be to add that to CFLAGS.
> It looks like that in r81600 Peter have "sneak in" such change in libc
> because the FILE structure was changed and we have to use that to get
> the code compile.

It shouldn't be needed, if the cross-tools stage completed successfully.
The toolchain built there will *only* look in the /usr/obj directory for
its headers.

Of course, if you are manually running make in lib/libc, then all bets
are off. :)  I think there is always a way to shoot yourself in the
foot then.


More information about the freebsd-arch mailing list