[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.