This fixes the decrementer, illegal and sc tests to compile
successfully with cross-compilers that don't provide unistd.h
or string.h. Instead of those headers we include stddef.h.
This also fixes tests/Makefile.test to do what one expects
when CROSS_COMPILE is defined in the environment.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
ARCH = $(shell uname -m)
ifneq ("$(ARCH)", "ppc64")
ifneq ("$(ARCH)", "ppc64le")
- CROSS_COMPILE = powerpc64le-linux-
+ CROSS_COMPILE ?= powerpc64le-linux-
endif
endif
-#include <unistd.h>
-#include <string.h>
+#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
-#include <unistd.h>
-#include <string.h>
+#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
-#include <unistd.h>
-#include <string.h>
+#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>