tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: install/48303: Linux cross build fails on ppc



On Mon, 28 Oct 2013, Joerg Sonnenberger wrote:
[problems with #define __unused in src/tools/compat/compat_defs.h]

This change is not acceptable as it will break any place using __unused.
The short version is that the glibc header shouldnt' be doing this.

Named starting with "__" are reserved to the implementation. Both NetBSD's headers and Linux or glibc's headers think that they are "the implementation", and so are allowed to use "__unused" in a way that suits them. The problem arises when we mix both implementations, by building NetBSD on a Linux host.

Perhaps the NetSBD tools cross-build should use __netbsd_unused instead of just __unused.

We could also split compat_defs.h into two parts, one to be included before and one after system headers. Then we could arrange for __unused to be undefined when host system headers are included, and defined later.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index