From 6a1c15425aa33744957540679f8ab5be4330a9f3 Mon Sep 17 00:00:00 2001 From: Patrick Welche Date: Fri, 9 Aug 2013 15:55:14 +0100 Subject: [PATCH] NetBSD stores stdbool.h in /usr/include -iwithprefix include will look in a compiler specific directory and thus not find it, so remove -nostdinc for NetBSD. (This applies for both gcc and clang.) Move (non-)addition of -nostdinc to xen/Rules.mk as this is not arch specific, as suggested by Jan Beulich. Signed-off-by: Patrick Welche --- xen/Rules.mk | 9 +++++++++ xen/arch/x86/Rules.mk | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 26e5bb6..581cf8b 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -13,6 +13,15 @@ lto ?= n include $(XEN_ROOT)/Config.mk +# Solaris and NetBSD grab stdarg.h and friends from the system include +# directory. +# Clang likewise. +ifeq ($(XEN_OS),SunOS) +else ifeq ($(XEN_OS),NetBSD) +else +CFLAGS-$(gcc) += -nostdinc +endif + # Hardcoded configuration implications and dependencies. # Do this is a neater way if it becomes unwieldy. ifeq ($(debug),y) diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 0a9d68d..a116739 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -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 += -fno-builtin -fno-common -Wredundant-decls CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe CFLAGS += -I$(BASEDIR)/include -- 1.8.3.3