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 09:47:53 +0200 Message-ID: <4DDF5729.8050805@amd.com> References: <4DDE698B.1060302@amd.com> <19934.31685.537152.784058@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19934.31685.537152.784058@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 05/26/11 18:11, Ian Jackson wrote: > Christoph Egger writes ("[Xen-devel] [PATCH] xen: Deal with stdarg.h and -nostdinc"): >> For compiling the xen kernel we use -nostdinc which means >> we don't want to rely on any external headers. >> That also counts for stdarg.h. > > Right, OK, but: > >> Use the external header when we compile the tools. >> Adapt libelf-loader.c which is compiled in the kernel >> and with the tools. > > -#include > +#include "../../include/xen/stdarg.h" > > Firstly, is this correct for all uses of libelf-loader ? This file is > compiled both for use inside Xen and for use on the host. In the > latter case it /should/ use the system's stdarg.h. This is exactly what happens in conjunction with the other diff. In the first case there is __XEN__ defined and in the latter case __XEN__ is *not* defined. > Also, this kind of relative path should not be necessary. The > relevant files should be on the include path. I tried but then compiling the tools failed. > So I think this should be fixed by arranging that your new stdarg.h is > on the relevant include path, not by changing the .c file. > > Ian. > -- ---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