[U-Boot] Sandbox question

Mike Frysinger vapier at gentoo.org
Thu Dec 1 20:21:05 CET 2011


On Thursday 01 December 2011 11:35:14 Andreas Bießmann wrote:
> I started to play around with new sandbox architecture and encountered a
> serious problem.
> Due to the '-nostdinc' switch the file arch/sandbox/cpu/os.c requires
> additional CPPFLAGS '-I/usr/include'. On my debian box this is not
> enough since the bits/*.h are placed in /usr/include/i386-linux-gnu and
> therefore I get errors when compiling arch/sandbox/os.c.
> Are there any clean solution to get this working?

try this
-mike

diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile
index e5e860b..25ca148 100644
--- a/arch/sandbox/cpu/Makefile
+++ b/arch/sandbox/cpu/Makefile
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# os.c is build in the system environment, so needs standard includes
-CPPFLAGS_arch/sandbox/cpu/os.o += -I/usr/include
-
 include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).o
@@ -40,6 +37,8 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
+$(obj)os.o: ALL_CFLAGS := $(filter-out -nostdinc,$(ALL_CFLAGS))
+
 #########################################################################
 
 # defines $(obj).depend target
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111201/b5fcbf06/attachment.pgp>


More information about the U-Boot mailing list