From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Welche Subject: Re: stdbool.h -nostdinc XSA-55 trouble Date: Sun, 11 Aug 2013 17:41:21 +0100 Message-ID: <20130811164121.GE933@quark> References: <20130808114945.GG22372@quark> <5203B51402000078000EA534@nat28.tlf.novell.com> <20130808151835.GB870@quark> <5203D59E02000078000EA634@nat28.tlf.novell.com> <20130808154714.GD870@quark> <5204ABEA02000078000EA8CA@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="RnlQjJ0d97Da+TV1" Return-path: Content-Disposition: inline In-Reply-To: <5204ABEA02000078000EA8CA@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 09, 2013 at 07:44:26AM +0100, Jan Beulich wrote: > >>> On 08.08.13 at 17:47, Patrick Welche wrote: > > On Thu, Aug 08, 2013 at 04:30:06PM +0100, Jan Beulich wrote: > >> No, according to my checking, the --prefix configure option > >> listed does not correlate with the directory where the header > >> is found. > > > > Yes - I think our emails crossed... > > > > The underlying problem is: > > > > Linux: /usr/lib/gcc/i?86-linux-gnu/n.m/include/stdbool.h > > NetBSD: /usr/include/stdbool.h > > So then my original recommendation holds: Extend the Solaris > workaround to NetBSD, but at the same time generalize it by > moving it from xen/arch/*/Rules.mk to xen/Rules.mk. So something like the attached would do the trick... (I had a successful "make xen" with this on -head) Cheers, Patrick --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-NetBSD-stores-stdbool.h-in-usr-include.patch" >>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 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --RnlQjJ0d97Da+TV1--