xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen: Deal with stdarg.h and -nostdinc
@ 2011-05-26 14:54 Christoph Egger
  2011-05-26 15:00 ` Christoph Egger
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Christoph Egger @ 2011-05-26 14:54 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]


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.

Use the external header when we compile the tools.
Adapt libelf-loader.c which is compiled in the kernel
and with the tools.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
---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

[-- Attachment #2: xen_stdarg.diff --]
[-- Type: text/plain, Size: 992 bytes --]

diff -r 24b01e02ea17 xen/common/libelf/libelf-loader.c
--- a/xen/common/libelf/libelf-loader.c	Thu May 26 11:34:49 2011 +0200
+++ b/xen/common/libelf/libelf-loader.c	Thu May 26 16:45:38 2011 +0200
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <stdarg.h>
+#include "../../include/xen/stdarg.h"
 
 #include "libelf-private.h"
 
diff -r 24b01e02ea17 xen/include/xen/stdarg.h
--- a/xen/include/xen/stdarg.h	Thu May 26 11:34:49 2011 +0200
+++ b/xen/include/xen/stdarg.h	Thu May 26 16:45:38 2011 +0200
@@ -1,5 +1,13 @@
-#if defined(__OpenBSD__)
-#  include "/usr/include/stdarg.h"
+#ifndef _XEN_STDARG_H_
+#define _XEN_STDARG_H_
+
+#if defined(__XEN__)
+typedef __builtin_va_list va_list;
+#define va_start(ap, last)    __builtin_stdarg_start((ap), (last))
+#define va_end(ap)            __builtin_va_end(ap)
+#define va_arg                __builtin_va_arg
 #else
 #  include <stdarg.h>
 #endif
+
+#endif	/* _XEN_STDARG_H_ */

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2011-05-27 15:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CA052B9C.2DB31%keir@xen.org>
2011-05-27  9:48 ` [PATCH] xen: Deal with stdarg.h and -nostdinc Christoph Egger
2011-05-27 13:13   ` Keir Fraser
2011-05-27 14:05     ` Christoph Egger
2011-05-27 14:41       ` Keir Fraser
2011-05-27 14:51       ` Keir Fraser
2011-05-27 15:08         ` Christoph Egger
2011-05-27 13:16   ` Tim Deegan
2011-05-27 13:19     ` Keir Fraser
2011-05-27 13:27       ` Tim Deegan
2011-05-27 13:30       ` Ian Campbell
2011-05-26 14:54 Christoph Egger
2011-05-26 15:00 ` Christoph Egger
2011-05-26 15:17 ` Keir Fraser
2011-05-26 15:19 ` Jan Beulich
2011-05-26 16:11 ` Ian Jackson
2011-05-26 17:08   ` Keir Fraser
2011-05-27  7:55     ` Christoph Egger
2011-05-27  8:46       ` Keir Fraser
2011-05-27  8:59         ` Christoph Egger
2011-05-27 10:57       ` Ian Jackson
2011-05-27  7:47   ` Christoph Egger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).