tests: Fix Makefile.test to not allow host includes
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 17 Jun 2020 04:00:04 +0000 (14:00 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 19 Jun 2020 10:28:03 +0000 (20:28 +1000)
xics was including the host limits.h for example

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
tests/Makefile.test
tests/xics/xics.c

index 3b800d0492d483340cad8916c60b85788060468d..ff0044da2ccfc12935a388bc3ef5a0dadc2f5fc1 100644 (file)
@@ -9,7 +9,7 @@ CC = $(CROSS_COMPILE)gcc
 LD = $(CROSS_COMPILE)ld
 OBJCOPY = $(CROSS_COMPILE)objcopy
 
-CFLAGS = -Os -g -Wall -std=c99 -msoft-float -mno-string -mno-multiple -mno-vsx -mno-altivec -mlittle-endian -fno-stack-protector -mstrict-align -ffreestanding -fdata-sections -ffunction-sections -I ../../include
+CFLAGS = -Os -g -Wall -std=c99 -nostdinc -msoft-float -mno-string -mno-multiple -mno-vsx -mno-altivec -mlittle-endian -fno-stack-protector -mstrict-align -ffreestanding -fdata-sections -ffunction-sections -I ../../include -isystem $(shell $(CC) -print-file-name=include)
 ASFLAGS = $(CFLAGS)
 LDFLAGS = -T powerpc.lds
 
index a2db3a5f1e37250900348811fec79dd66b5525e8..46f9a016f81a684f469bf79f142a623012289567 100644 (file)
@@ -1,7 +1,6 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <stdbool.h>
-#include <limits.h>
 
 #include "console.h"
 #include "xics.h"