On 03/08/16 08:58, Rick Payne wrote:
There does seem to be a large amount of confusion in the OSX build about
whether it should be using the system include files or not. For instance, the
test for the xen headers fails not because the xen headers are missing (I add
the include path for that), but because the initial toolchain can’t find
stdint.h. For example:
[rickp@scampi ~]$ cat t2.c
#include <stdint.h>
#include <xen.h>
[rickp@scampi ~]$ x86_64-netbsd-gcc -Isrc/rumpkernels/xen/xen/include/public -o
/dev/null t2.c
t2.c:1:20: fatal error: stdint.h: No such file or directory
#include <stdint.h>
^
The x86_64-netbsd-gcc is built as documented at
https://github.com/rumpkernel/wiki/wiki/Howto:-Set-up-a-Rumprun-toolchain-in-Mac-OS-X.
It seems that the random inclusion (or not) of standard headers is what gives
me my previous failure (worked around by hacking
obj-amd64-*/buildrump.sh/tools/mandoc/config.h ). I can work around this in a
few places but then I hit further include problems when compiling the actual
rumpkernel.
By this time, its using the x86_64--netbsd-gcc (note the double -, subtly different!)
which is the rumprun toolchain. That runs into missing .h files (eg. <errno.h>
etc) and though I can point this at various places, it seems like something more
fundamental is wrong.
What’s the actual intention with regards to include files? Use the netbsd ones?
Hmm, that rings a bell. I think the instructions on the wiki are wrong.
I investigated the issue in this thread (*), but guess there wasn't
enough interest in OS X for anyone to update the wiki:
*) https://www.freelists.org/post/rumpkernel-users/toolchain-on-mac-fails,2
However, I think now NetBSD-current includes a new enough binutils, so
the wiki could be updated to generating a toolchain from NetBSD-current.
The incorrect "manually" instructions should be deleted anyway.