u-boot-brain/arch/sandbox/cpu/Makefile
Masahiro Yamada 3d83efbce9 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 <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-01-29 16:08:52 -05:00

17 lines
464 B
Makefile

#
# Copyright (c) 2011 The Chromium OS Authors.
#
# (C) Copyright 2000-2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# SPDX-License-Identifier: GPL-2.0+
#
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: CFLAGS := $(filter-out -nostdinc,\
$(patsubst -I%,-idirafter%,$(CFLAGS)))
$(obj).depend.os: CPPFLAGS := $(filter-out -nostdinc,\
$(patsubst -I%,-idirafter%,$(CPPFLAGS)))