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: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen: Deal with stdarg.h and -nostdinc
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Thu, 26 May 2011 18:08:26 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 26 May 2011 10:35:52 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:cc:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=waUYHY76UdUxcSFLsInJuM/332rGqJnPH2qaGfGEq4E=; b=H0OGddm1Yvqz4z+ZPRhiMy3a1lXLZeChXEJIgaOEBh7pSYYgccnL1KutFnQdeOsogD xEtJcpQq1M3cTHsSUP/UGHT5qCocu8MqCubIw3LlK693oQYRLkndkdm9z5xy5f1CCo2L /auCJdVbdCgkDAlmRzgyn/qvWVReuE22u8RPs=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=Oi2Dk/s/CQawb8AezubDduhJGbakm+h6j03beLqpvnzUGjjDAJeyJ6wjZHOiMCpBrN /ZF1e3Ljn+rdQHsN7tg48PqSHlDlg1U6Uhvblu0V94dh6tp5/GUe9I+YyVHtIxKJhZ+p 1DLXYDZXBd06ZYFGbinOT1bA9uUvynjgWeQzI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19934.31685.537152.784058@xxxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acwbx4a+sgn9G+csZka7xKgHwLBjvw==
Thread-topic: [Xen-devel] [PATCH] xen: Deal with stdarg.h and -nostdinc
User-agent: Microsoft-Entourage/12.29.0.110113
On 26/05/2011 17:11, "Ian Jackson" <Ian.Jackson@xxxxxxxxxxxxx> 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 vor stdarg.h.
> 
> Right, OK, but:

Not really. We are only doing the same as Linux right now. I do note that
they add an -isystem option to their command line, with a gcc include path
that they presumably dump out of gcc in some standard way. However, our
current approach seems to work, if it fails to work in some situation it is
likely to be pretty obvious (build or link failure), and we can fix it then.
This stuff can be moderately fragile, and we've now had no actual bug
reports about it in a long while.

 -- Keir

>> Use the external header when we compile the tools.
>> Adapt libelf-loader.c which is compiled in the kernel
>> and with the tools.
> 
> -#include <stdarg.h>
> +#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.
> 
> Also, this kind of relative path should not be necessary.  The
> relevant files should be on the include path.
> 
> 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.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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