From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] ocaml NetBSD support Date: Fri, 7 May 2010 14:13:17 +0200 Message-ID: <201005071413.18544.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_ePA5LgZt2eZcrv+" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_ePA5LgZt2eZcrv+ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch adds support for NetBSD to ocaml xenstore. Signed-off-by: Christoph Egger -- ---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 --Boundary-00=_ePA5LgZt2eZcrv+ Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_ocaml.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_ocaml.diff" 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 --Boundary-00=_ePA5LgZt2eZcrv+ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_ePA5LgZt2eZcrv+--