Turns out we had a bunch of silly dependencies on libc headers that are
not included with freestanding compilers. Fix all this and change the
CFLAGS to exclude libc headers and only include the built-in compiler
path.
Add our own versions of assert.h, errno.h, limits.h, and move malloc.h
and string.h together into a new path used as -isystem, so these headers
can be included using #include <>.
Remove a bunch of other dependencies in third-party code.
Add a strnlen function.
Disable building the libfdt overlay code for now, as it needs a strtoul
implementation. We can throw that in if/when we decide to use overlays.
Signed-off-by: Hector Martin <marcan@marcan.st>
this is required to fix the following error when compiling with clang:
CC build/string.o
src/string.c:3:10: error: 'string.h' file not found with <angled> include; use "quotes" instead
^~~~~~~~~~
"string.h"
Signed-off-by: Sven Peter <sven@svenpeter.dev>