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

[Xen-changelog] [xen-unstable] [OpenBSD] Various changes to get Xen buil

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [OpenBSD] Various changes to get Xen building on OpenBSD.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Oct 2006 18:01:21 +0000
Delivery-date: Wed, 18 Oct 2006 11:01:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 3409c35a0b0eec7de1f2a85e4608d5b161dcef0e
# Parent  307e5ed9657e3efa81dd337c7722ea877c5e5ba9
[OpenBSD] Various changes to get Xen building on OpenBSD.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 config/Linux.mk            |   33 +--------------------------------
 config/OpenBSD.mk          |    1 +
 config/StdGNU.mk           |   30 ++++++++++++++++++++++++++++++
 config/SunOS.mk            |    2 --
 config/x86_32.mk           |    4 ++++
 config/x86_64.mk           |    4 ++++
 xen/Rules.mk               |    2 +-
 xen/common/vsprintf.c      |    2 +-
 xen/drivers/char/console.c |    2 +-
 xen/include/xen/lib.h      |    2 +-
 xen/include/xen/stdarg.h   |    5 +++++
 11 files changed, 49 insertions(+), 38 deletions(-)

diff -r 307e5ed9657e -r 3409c35a0b0e config/Linux.mk
--- a/config/Linux.mk   Wed Oct 18 16:56:27 2006 +0100
+++ b/config/Linux.mk   Wed Oct 18 17:08:09 2006 +0100
@@ -1,35 +1,4 @@
-# -*- mode: Makefile; -*-
-
-AS         = $(CROSS_COMPILE)as
-LD         = $(CROSS_COMPILE)ld
-CC         = $(CROSS_COMPILE)gcc
-CPP        = $(CROSS_COMPILE)gcc -E
-AR         = $(CROSS_COMPILE)ar
-RANLIB     = $(CROSS_COMPILE)ranlib
-NM         = $(CROSS_COMPILE)nm
-STRIP      = $(CROSS_COMPILE)strip
-OBJCOPY    = $(CROSS_COMPILE)objcopy
-OBJDUMP    = $(CROSS_COMPILE)objdump
-
-INSTALL      = install
-INSTALL_DIR  = $(INSTALL) -d -m0755
-INSTALL_DATA = $(INSTALL) -m0644
-INSTALL_PROG = $(INSTALL) -m0755
-
-LIB64DIR = lib64
-
-SOCKET_LIBS =
-CURSES_LIBS = -lncurses
-SONAME_LDFLAG = -soname
-SHLIB_CFLAGS = -shared
-
-ifneq ($(debug),y)
-# Optimisation flags are overridable
-CFLAGS ?= -O2 -fomit-frame-pointer
-else
-# Less than -O1 produces bad code and large stack frames
-CFLAGS ?= -O1 -fno-omit-frame-pointer
-endif
+include $(XEN_ROOT)/config/StdGNU.mk
 
 # You may use wildcards, e.g. KERNELS=*2.6*
 KERNELS ?= linux-2.6-xen
diff -r 307e5ed9657e -r 3409c35a0b0e config/SunOS.mk
--- a/config/SunOS.mk   Wed Oct 18 16:56:27 2006 +0100
+++ b/config/SunOS.mk   Wed Oct 18 17:08:09 2006 +0100
@@ -1,5 +1,3 @@
-# -*- mode: Makefile; -*-
-
 AS         = $(CROSS_COMPILE)gas
 LD         = $(CROSS_COMPILE)gld
 CC         = $(CROSS_COMPILE)gcc
diff -r 307e5ed9657e -r 3409c35a0b0e config/x86_32.mk
--- a/config/x86_32.mk  Wed Oct 18 16:56:27 2006 +0100
+++ b/config/x86_32.mk  Wed Oct 18 17:08:09 2006 +0100
@@ -10,4 +10,8 @@ LIBDIR := lib
 LIBDIR := lib
 
 # Use only if calling $(LD) directly.
+ifeq ($(XEN_OS),OpenBSD)
+LDFLAGS_DIRECT += -melf_i386_obsd
+else
 LDFLAGS_DIRECT += -melf_i386
+endif
diff -r 307e5ed9657e -r 3409c35a0b0e config/x86_64.mk
--- a/config/x86_64.mk  Wed Oct 18 16:56:27 2006 +0100
+++ b/config/x86_64.mk  Wed Oct 18 17:08:09 2006 +0100
@@ -10,4 +10,8 @@ LIBDIR = $(LIB64DIR)
 LIBDIR = $(LIB64DIR)
 
 # Use only if calling $(LD) directly.
+ifeq ($(XEN_OS),OpenBSD)
+LDFLAGS_DIRECT += -melf_x86_64_obsd
+else
 LDFLAGS_DIRECT += -melf_x86_64
+endif
diff -r 307e5ed9657e -r 3409c35a0b0e xen/Rules.mk
--- a/xen/Rules.mk      Wed Oct 18 16:56:27 2006 +0100
+++ b/xen/Rules.mk      Wed Oct 18 17:08:09 2006 +0100
@@ -72,7 +72,7 @@ AFLAGS   += $(patsubst -std=gnu%,,$(CFLA
 AFLAGS   += $(patsubst -std=gnu%,,$(CFLAGS))
 
 # LDFLAGS are only passed directly to $(LD)
-LDFLAGS  += $(LDFLAGS_DIRECT)
+LDFLAGS  := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
 
 include Makefile
 
diff -r 307e5ed9657e -r 3409c35a0b0e xen/common/vsprintf.c
--- a/xen/common/vsprintf.c     Wed Oct 18 16:56:27 2006 +0100
+++ b/xen/common/vsprintf.c     Wed Oct 18 17:08:09 2006 +0100
@@ -16,7 +16,7 @@
  * - scnprintf and vscnprintf
  */
 
-#include <stdarg.h>
+#include <xen/stdarg.h>
 #include <xen/ctype.h>
 #include <xen/lib.h>
 #include <asm/div64.h>
diff -r 307e5ed9657e -r 3409c35a0b0e xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Wed Oct 18 16:56:27 2006 +0100
+++ b/xen/drivers/char/console.c        Wed Oct 18 17:08:09 2006 +0100
@@ -6,7 +6,7 @@
  * Copyright (c) 2002-2004, K A Fraser.
  */
 
-#include <stdarg.h>
+#include <xen/stdarg.h>
 #include <xen/config.h>
 #include <xen/version.h>
 #include <xen/init.h>
diff -r 307e5ed9657e -r 3409c35a0b0e xen/include/xen/lib.h
--- a/xen/include/xen/lib.h     Wed Oct 18 16:56:27 2006 +0100
+++ b/xen/include/xen/lib.h     Wed Oct 18 17:08:09 2006 +0100
@@ -2,7 +2,7 @@
 #define __LIB_H__
 
 #include <xen/inttypes.h>
-#include <stdarg.h>
+#include <xen/stdarg.h>
 #include <xen/config.h>
 #include <xen/types.h>
 #include <xen/xmalloc.h>
diff -r 307e5ed9657e -r 3409c35a0b0e config/OpenBSD.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/config/OpenBSD.mk Wed Oct 18 17:08:09 2006 +0100
@@ -0,0 +1,1 @@
+include $(XEN_ROOT)/config/StdGNU.mk
diff -r 307e5ed9657e -r 3409c35a0b0e config/StdGNU.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/config/StdGNU.mk  Wed Oct 18 17:08:09 2006 +0100
@@ -0,0 +1,30 @@
+AS         = $(CROSS_COMPILE)as
+LD         = $(CROSS_COMPILE)ld
+CC         = $(CROSS_COMPILE)gcc
+CPP        = $(CROSS_COMPILE)gcc -E
+AR         = $(CROSS_COMPILE)ar
+RANLIB     = $(CROSS_COMPILE)ranlib
+NM         = $(CROSS_COMPILE)nm
+STRIP      = $(CROSS_COMPILE)strip
+OBJCOPY    = $(CROSS_COMPILE)objcopy
+OBJDUMP    = $(CROSS_COMPILE)objdump
+
+INSTALL      = install
+INSTALL_DIR  = $(INSTALL) -d -m0755
+INSTALL_DATA = $(INSTALL) -m0644
+INSTALL_PROG = $(INSTALL) -m0755
+
+LIB64DIR = lib64
+
+SOCKET_LIBS =
+CURSES_LIBS = -lncurses
+SONAME_LDFLAG = -soname
+SHLIB_CFLAGS = -shared
+
+ifneq ($(debug),y)
+# Optimisation flags are overridable
+CFLAGS ?= -O2 -fomit-frame-pointer
+else
+# Less than -O1 produces bad code and large stack frames
+CFLAGS ?= -O1 -fno-omit-frame-pointer
+endif
diff -r 307e5ed9657e -r 3409c35a0b0e xen/include/xen/stdarg.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/xen/stdarg.h  Wed Oct 18 17:08:09 2006 +0100
@@ -0,0 +1,5 @@
+#if defined(__OpenBSD__) || defined(__sun__)
+#  include "/usr/include/stdarg.h"
+#else
+#  include <stdarg.h>
+#endif

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [OpenBSD] Various changes to get Xen building on OpenBSD., Xen patchbot-unstable <=