WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xen: Deal with stdarg.h and -nostdinc

To: Keir Fraser <keir@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen: Deal with stdarg.h and -nostdinc
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Fri, 27 May 2011 16:05:47 +0200
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 27 May 2011 07:07:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CA05620F.2DB3F%keir@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CA05620F.2DB3F%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv:1.9.2.17) Gecko/20110523 Lightning/1.0b3pre Thunderbird/3.1.10
On 05/27/11 15:13, Keir Fraser wrote:
On 27/05/2011 10:48, "Christoph Egger"<Christoph.Egger@xxxxxxx>  wrote:

Finally, rather than referencing a hardcoded /usr/include path or including
gcc intrinsics in xen/stdarg.h, would *BSD prefer a -isystem command-line
option to include the gcc headers in the search path? Then we could perhaps
even get rid of xen/stdarg.h completely.

NetBSD is about to add clang/llvm support. If -isystem works for both
gcc and clang then this should be fine.

Something like the attached patch? I don't know whether this would work for
clang too -- cc'ing Tim who will know or can try it out.

I wouldn't backport this one to 4.1, but my first patch was a cleanup plus
BSD-specific changes, so a variant on that would be suitable for 4.0/4.1,
with (if it works) this new one in unstable.

$ clang -print-file-name=include
include
$ gcc -print-file-name=include
include
$ gcc -print-file-name=a
a
$

I got two variants working:
a) use -nostdinc and map the stdarg usage to the gcc builtins
b) do not use -nostdinc on NetBSD

Both 0?-stdarg-fixes work with a minor
modification to match case a) or case b).

Christoph


--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>