xen: move -nostdinc into common Rules.mk.
authorTim Deegan <tim@xen.org>
Thu, 15 Aug 2013 10:57:52 +0000 (11:57 +0100)
committerTim Deegan <tim@xen.org>
Thu, 15 Aug 2013 15:38:52 +0000 (16:38 +0100)
Previously we didn't use it at all the on ARM ports or for clang builds.

For ARM, I think this is just an oversight.

For clang, this used not to work, because '-withprefix include' didn't
let us see stdarg.h, but that's fixed in clang v3.0.

Also move the '-withprefix include' to beside -nostdinc as it's only
needed with -nostdinc anyway.

Signed-off-by: Tim Deegan <tim@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/Rules.mk
xen/arch/x86/Rules.mk

index c432ad6f6d1bf929c7aac784a157c8439f41bbe9..bbfc1acc3c7e4870127a1df73752bc8e0a61475d 100644 (file)
@@ -44,8 +44,12 @@ ALL_OBJS-$(x86)          += $(BASEDIR)/crypto/built_in.o
 CFLAGS-y                += -fno-builtin -fno-common
 CFLAGS-y                += -Werror -Wredundant-decls -Wno-pointer-arith
 CFLAGS-y                += -pipe
-CFLAGS-y                += -iwithprefix include
 CFLAGS-y                += -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
+# Solaris puts stdarg.h &c in the system include directory.
+ifneq ($(XEN_OS),SunOS)
+CFLAGS-y                += -nostdinc -iwithprefix include
+endif
+
 CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE
 CFLAGS-$(FLASK_ENABLE)  += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
 CFLAGS-$(FLASK_ENABLE)  += -DFLASK_DEVELOP -DFLASK_BOOTPARAM -DFLASK_AVC_STATS
index f629dff3f4f93b482d2d47a003d9f430ca0f54bd..04c1a90477134ac102da6bc5c67137b9e6e67307 100644 (file)
@@ -19,12 +19,6 @@ xenoprof := y
 #
 supervisor_mode_kernel ?= n
 
-# Solaris grabs stdarg.h and friends from the system include directory.
-# Clang likewise.
-ifneq ($(XEN_OS),SunOS)
-CFLAGS-$(gcc) += -nostdinc
-endif
-
 CFLAGS += -I$(BASEDIR)/include 
 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default