From: Paul Mackerras Date: Fri, 3 Apr 2020 02:46:36 +0000 (+1100) Subject: tests: Adjust header inclusions and Makefile.test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c13c73f1ae93c4d33458fa050953d6675f4e269d;p=microwatt.git 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 --- diff --git a/tests/Makefile.test b/tests/Makefile.test index a043810..9676370 100644 --- a/tests/Makefile.test +++ b/tests/Makefile.test @@ -1,7 +1,7 @@ ARCH = $(shell uname -m) ifneq ("$(ARCH)", "ppc64") ifneq ("$(ARCH)", "ppc64le") - CROSS_COMPILE = powerpc64le-linux- + CROSS_COMPILE ?= powerpc64le-linux- endif endif diff --git a/tests/decrementer/decrementer.c b/tests/decrementer/decrementer.c index 36ac922..2617a94 100644 --- a/tests/decrementer/decrementer.c +++ b/tests/decrementer/decrementer.c @@ -1,5 +1,4 @@ -#include -#include +#include #include #include diff --git a/tests/illegal/illegal.c b/tests/illegal/illegal.c index 0778ffe..a1ea325 100644 --- a/tests/illegal/illegal.c +++ b/tests/illegal/illegal.c @@ -1,5 +1,4 @@ -#include -#include +#include #include #include diff --git a/tests/sc/sc.c b/tests/sc/sc.c index 67d80b9..2914291 100644 --- a/tests/sc/sc.c +++ b/tests/sc/sc.c @@ -1,5 +1,4 @@ -#include -#include +#include #include #include