From: Christoph Egger <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] ocaml NetBSD support
Date: Fri, 7 May 2010 14:13:17 +0200 [thread overview]
Message-ID: <201005071413.18544.Christoph.Egger@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
Hi!
Attached patch adds support for NetBSD to ocaml xenstore.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: xen_ocaml.diff --]
[-- Type: text/x-diff, Size: 3615 bytes --]
diff -r 49a69b4bc421 Config.mk
--- a/Config.mk Fri May 07 13:02:04 2010 +0200
+++ b/Config.mk Fri May 07 13:51:16 2010 +0200
@@ -171,8 +171,12 @@ ifeq ($(OCAML_TOOLS),y)
ifeq ($(CONFIG_Linux),y)
OCAML_TOOLS := $(shell ocamlopt -v > /dev/null 2>&1 && echo "y" || echo "n")
else
+ifeq ($(CONFIG_NetBSD),y)
+OCAML_TOOLS := $(shell ocamlopt -v > /dev/null 2>&1 && echo "y" || echo "n")
+else
OCAML_TOOLS := n
endif
endif
+endif
-include $(XEN_ROOT)/.config
diff -r 49a69b4bc421 tools/ocaml/common.make
--- a/tools/ocaml/common.make Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/common.make Fri May 07 13:51:16 2010 +0200
@@ -1,3 +1,5 @@
+include $(XEN_ROOT)/tools/Rules.mk
+
CC ?= gcc
OCAMLOPT ?= ocamlopt
OCAMLC ?= ocamlc
@@ -9,7 +11,13 @@ OCAMLYACC ?= ocamlyacc
CFLAGS ?= -Wall -fPIC -O2 -Werror
CFLAGS += -I$(TOPLEVEL)/../include -I$(TOPLEVEL)/../libxc
+
+ifeq ($(CONFIG_Linux),y)
CFLAGS += -I/usr/lib64/ocaml -I/usr/lib/ocaml
+endif
+ifeq ($(CONFIG_NetBSD),y)
+CFLAGS += -I/usr/pkg/lib/ocaml -fPIC
+endif
OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p')
OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F
diff -r 49a69b4bc421 tools/ocaml/libs/eventchn/Makefile
--- a/tools/ocaml/libs/eventchn/Makefile Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/libs/eventchn/Makefile Fri May 07 13:51:16 2010 +0200
@@ -1,4 +1,5 @@
TOPLEVEL=../..
+XEN_ROOT=$(TOPLEVEL)/../..
include $(TOPLEVEL)/common.make
OBJS = eventchn
diff -r 49a69b4bc421 tools/ocaml/libs/log/Makefile
--- a/tools/ocaml/libs/log/Makefile Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/libs/log/Makefile Fri May 07 13:51:16 2010 +0200
@@ -1,4 +1,5 @@
TOPLEVEL=../..
+XEN_ROOT=$(TOPLEVEL)/../..
include $(TOPLEVEL)/common.make
OBJS = syslog log logs
diff -r 49a69b4bc421 tools/ocaml/libs/mmap/Makefile
--- a/tools/ocaml/libs/mmap/Makefile Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/libs/mmap/Makefile Fri May 07 13:51:16 2010 +0200
@@ -1,4 +1,5 @@
TOPLEVEL=../..
+XEN_ROOT=$(TOPLEVEL)/../..
include $(TOPLEVEL)/common.make
OBJS = mmap
diff -r 49a69b4bc421 tools/ocaml/libs/uuid/Makefile
--- a/tools/ocaml/libs/uuid/Makefile Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/libs/uuid/Makefile Fri May 07 13:51:16 2010 +0200
@@ -1,4 +1,5 @@
TOPLEVEL=../..
+XEN_ROOT=$(TOPLEVEL)/../..
include $(TOPLEVEL)/common.make
OBJS = uuid
diff -r 49a69b4bc421 tools/ocaml/libs/xb/Makefile
--- a/tools/ocaml/libs/xb/Makefile Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/libs/xb/Makefile Fri May 07 13:51:16 2010 +0200
@@ -1,4 +1,5 @@
TOPLEVEL=../..
+XEN_ROOT=$(TOPLEVEL)/../..
include $(TOPLEVEL)/common.make
CFLAGS += -I../mmap
diff -r 49a69b4bc421 tools/ocaml/libs/xc/Makefile
--- a/tools/ocaml/libs/xc/Makefile Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/libs/xc/Makefile Fri May 07 13:51:16 2010 +0200
@@ -1,4 +1,5 @@
TOPLEVEL=../..
+XEN_ROOT=$(TOPLEVEL)/../..
include $(TOPLEVEL)/common.make
CFLAGS += -I../mmap -I./
diff -r 49a69b4bc421 tools/ocaml/libs/xs/Makefile
--- a/tools/ocaml/libs/xs/Makefile Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/libs/xs/Makefile Fri May 07 13:51:16 2010 +0200
@@ -1,4 +1,5 @@
TOPLEVEL=../..
+XEN_ROOT=$(TOPLEVEL)/../..
include $(TOPLEVEL)/common.make
OCAMLINCLUDE += -I ../xb/
diff -r 49a69b4bc421 tools/ocaml/xenstored/Makefile
--- a/tools/ocaml/xenstored/Makefile Fri May 07 13:02:04 2010 +0200
+++ b/tools/ocaml/xenstored/Makefile Fri May 07 13:51:16 2010 +0200
@@ -1,3 +1,4 @@
+XEN_ROOT = ../../..
OCAML_TOPLEVEL = ..
include $(OCAML_TOPLEVEL)/common.make
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2010-05-07 12:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 12:13 Christoph Egger [this message]
2010-05-07 12:49 ` [PATCH] ocaml NetBSD support Vincent Hanquez
2010-05-07 13:39 ` Christoph Egger
2010-05-07 14:42 ` Christoph Egger
2010-05-07 14:45 ` Vincent Hanquez
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=201005071413.18544.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 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).