From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: Re: [PATCH] xen: Deal with stdarg.h and -nostdinc Date: Fri, 27 May 2011 16:05:47 +0200 Message-ID: <4DDFAFBB.50607@amd.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: 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: Tim Deegan , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 05/27/11 15:13, Keir Fraser wrote: > On 27/05/2011 10:48, "Christoph Egger" 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