tests: Adjust header inclusions and Makefile.test

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>
pull/157/head
Paul Mackerras 5 years ago
parent 04ec2115ad
commit c13c73f1ae

@ -1,7 +1,7 @@
ARCH = $(shell uname -m) ARCH = $(shell uname -m)
ifneq ("$(ARCH)", "ppc64") ifneq ("$(ARCH)", "ppc64")
ifneq ("$(ARCH)", "ppc64le") ifneq ("$(ARCH)", "ppc64le")
CROSS_COMPILE = powerpc64le-linux- CROSS_COMPILE ?= powerpc64le-linux-
endif endif
endif endif



@ -1,5 +1,4 @@
#include <unistd.h> #include <stddef.h>
#include <string.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>



@ -1,5 +1,4 @@
#include <unistd.h> #include <stddef.h>
#include <string.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>



@ -1,5 +1,4 @@
#include <unistd.h> #include <stddef.h>
#include <string.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>



Loading…
Cancel
Save