From: John Levon Subject: Re: xen/stdarg.h patch Date: Thu, 19 Oct 2006 16:38:25 +0100 Message-ID: <20061019153825.GA30888@totally.trollied.org> References: <20061018184042.GB14774@totally.trollied.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, Oct 19, 2006 at 02:41:49PM +0100, Keir Fraser wrote: > > Only by adding "-I /usr/include/", and that doesn't seem ideal. > > Perhaps acceptable if it works? We generally like to avoid it because it > prevents us accidentally including system header files. If we need it just > for Solaris it's not so bad though -- our main build environment (Linux) > will continue to provide a safety net. Fair point. regards john # HG changeset patch # User john.levon@sun.com # Date 1161272148 25200 # Node ID 73d8a4df0f0b0d5747f5937f5954a5302a9e2f74 # Parent 2e1a04af35cf4bc43dc6f0cde4539c5117fa500f Disable -nostdinc on Solaris so we can use the system's . Signed-off-by: John Levon diff --git a/config/StdGNU.mk b/config/StdGNU.mk --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -21,6 +21,8 @@ SONAME_LDFLAG = -soname SONAME_LDFLAG = -soname SHLIB_CFLAGS = -shared +STDINC_CFLAG = -nostdinc + ifneq ($(debug),y) # Optimisation flags are overridable CFLAGS ?= -O2 -fomit-frame-pointer diff --git a/config/SunOS.mk b/config/SunOS.mk --- a/config/SunOS.mk +++ b/config/SunOS.mk @@ -33,4 +33,7 @@ endif CFLAGS += -Wa,--divide -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ +# We can't use -nostdinc, as Xen needs +STDINC_CFLAG = + CONFIG_IOEMU_OS = n diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -11,7 +11,7 @@ pae ?= n pae ?= n supervisor_mode_kernel ?= n -CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing +CFLAGS += $(STDINC_CFLAG) -fno-builtin -fno-common -fno-strict-aliasing CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe CFLAGS += -I$(BASEDIR)/include CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic diff --git a/xen/include/xen/stdarg.h b/xen/include/xen/stdarg.h --- a/xen/include/xen/stdarg.h +++ b/xen/include/xen/stdarg.h @@ -1,4 +1,4 @@ -#if defined(__OpenBSD__) || defined(__sun__) +#if defined(__OpenBSD__) # include "/usr/include/stdarg.h" #else # include