All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christoph Egger" <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH 1/3] Add support for OpenBSD
Date: Tue, 17 Oct 2006 16:30:01 +0200	[thread overview]
Message-ID: <200610171630.02139.Christoph.Egger@amd.com> (raw)

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


Hi!

I made the xen kernel buildable on OpenBSD.
The first patch touches the buildsystem.


[-- Attachment #2: openbsd_buildsystem.diff --]
[-- Type: text/x-diff, Size: 2436 bytes --]

diff -r bd207697f0c7 xen/arch/x86/Rules.mk
--- a/xen/arch/x86/Rules.mk	Wed Oct 18 13:43:35 2006 +0100
+++ b/xen/arch/x86/Rules.mk	Tue Oct 17 16:20:45 2006 +0200
@@ -34,7 +34,7 @@ endif
 endif
 
 ifeq ($(XEN_TARGET_ARCH),x86_32)
-LDFLAGS += -m elf_i386
+LDFLAGS += -m $(ELFFMT_X86_32) 
 x86_32 := y
 x86_64 := n
 endif
@@ -45,7 +45,7 @@ CFLAGS  += -fno-asynchronous-unwind-tabl
 # -fvisibility=hidden reduces -fpic cost, if it's available
 CFLAGS  += $(shell $(CC) -v --help 2>&1 | grep " -fvisibility=" | \
              grep -q hidden && echo "-DGCC_HAS_VISIBILITY_ATTRIBUTE")
-LDFLAGS += -m elf_x86_64
+LDFLAGS += -m $(ELFFMT_X86_64) 
 x86_32 := n
 x86_64 := y
 endif
diff -r bd207697f0c7 config/Linux.mk
--- a/config/Linux.mk	Wed Oct 18 13:43:35 2006 +0100
+++ b/config/Linux.mk	Tue Oct 17 16:20:45 2006 +0200
@@ -31,6 +31,9 @@ CFLAGS ?= -O1 -fno-omit-frame-pointer
 CFLAGS ?= -O1 -fno-omit-frame-pointer
 endif
 
+ELFFMT_X86_32 = elf_i386
+ELFFMT_X86_64 = elf_x86_64
+
 # You may use wildcards, e.g. KERNELS=*2.6*
 KERNELS ?= linux-2.6-xen
 
diff -r bd207697f0c7 config/SunOS.mk
--- a/config/SunOS.mk	Wed Oct 18 13:43:35 2006 +0100
+++ b/config/SunOS.mk	Tue Oct 17 16:20:45 2006 +0200
@@ -34,3 +34,6 @@ endif
 endif
 
 CFLAGS += -Wa,--divide
+
+ELFFMT_X86_32 = elf_i386
+ELFFMT_X86_64 = elf_x86_64
diff -r bd207697f0c7 config/OpenBSD.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/OpenBSD.mk	Tue Oct 17 16:20:45 2006 +0200
@@ -0,0 +1,35 @@
+# -*- 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
+
+ELFFMT_X86_32 = elf_i386_obsd
+ELFFMT_X86_64 = elf_x86_64_obsd

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

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

             reply	other threads:[~2006-10-17 14:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-17 14:30 Christoph Egger [this message]
2006-10-18 15:24 ` [PATCH 1/3] Add support for OpenBSD Keir Fraser
2006-10-17 16:02   ` Christoph Egger
2006-10-18 16:11     ` Keir Fraser
2006-10-18 16:17       ` Anil Madhavapeddy
2006-10-18 16:27         ` Keir Fraser
2006-10-18  7:25           ` Christoph Egger
2006-10-19  7:41             ` Keir Fraser
2006-10-18  7:57               ` Christoph Egger
2006-10-19  8:00                 ` Keir Fraser
2006-10-19  8:50                 ` Anil Madhavapeddy
2006-10-18 16:34           ` Anil Madhavapeddy
2006-10-18 16:39             ` Keir Fraser
2006-10-18 17:47               ` Brendan Cully
2006-10-18 18:13                 ` Ian Pratt
2006-10-18 19:22                   ` Brendan Cully
2006-10-18 17:08           ` John Clemens
2006-10-18 18:19             ` Keir Fraser
2006-10-18 16:01   ` Anil Madhavapeddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200610171630.02139.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.