u-boot-brain/arch/sandbox/cpu/Makefile
Simon Glass cbe5cdfcd3 sandbox: Use system headers first for sandbox's os.c
This file must be compiled with system headers, even if U-Boot has headers
of the same name. The existing solution for this is good enough for libfdt,
but fails when we have headers like stdint.h in U-Boot.

Use -idirafter instead of -I, and remove the -nostdinc and other things
that we don't want for this file. The best way to do this is to keep a
copy of the original flags, rather than trying to filter them later.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-11-21 16:54:26 -07:00

17 lines
476 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: ALL_CFLAGS := $(BASE_CPPFLAGS) \
$(patsubst %, -idirafter %, $(BASE_INCLUDE_DIRS))
$(obj).depend.os: CPPFLAGS := $(BASE_CPPFLAGS) \
$(patsubst %, -idirafter %, $(BASE_INCLUDE_DIRS))