From 3d83efbce9c5c0e4f318afd62960b780216f53f0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 26 Nov 2013 16:13:59 +0900 Subject: sandbox: Use system headers first for sandbox's os.c in a different way Commit cbe5cdfcd changed config.mk and arch/sandbox/cpu/Makefile to use -idirafter instead of -I and remove -nostdinc. But * Sandbox-specific code dirties config.mk * os.c is compiled without such compiler flags as: -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -fno-stack-protector -fstack-usage -Wno-format-nonliteral This commit use -idirafter and remove the -nostdinc differently and more simply. Signed-off-by: Masahiro Yamada Acked-by: Simon Glass --- arch/sandbox/cpu/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/sandbox/cpu/Makefile') diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile index 58c2537762..b564294a84 100644 --- a/arch/sandbox/cpu/Makefile +++ b/arch/sandbox/cpu/Makefile @@ -10,7 +10,7 @@ obj-y := cpu.o os.o start.o state.o # os.c is build in the system environment, so needs standard includes -$(obj)os.o: ALL_CFLAGS := $(BASE_CPPFLAGS) \ - $(patsubst %, -idirafter %, $(BASE_INCLUDE_DIRS)) -$(obj).depend.os: CPPFLAGS := $(BASE_CPPFLAGS) \ - $(patsubst %, -idirafter %, $(BASE_INCLUDE_DIRS)) +$(obj)os.o: CFLAGS := $(filter-out -nostdinc,\ + $(patsubst -I%,-idirafter%,$(CFLAGS))) +$(obj).depend.os: CPPFLAGS := $(filter-out -nostdinc,\ + $(patsubst -I%,-idirafter%,$(CPPFLAGS))) -- cgit v1.2.1