* [PATCH] ocaml NetBSD support
@ 2010-05-07 12:13 Christoph Egger
2010-05-07 12:49 ` Vincent Hanquez
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Egger @ 2010-05-07 12:13 UTC (permalink / raw)
To: xen-devel
[-- 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ocaml NetBSD support
2010-05-07 12:13 [PATCH] ocaml NetBSD support Christoph Egger
@ 2010-05-07 12:49 ` Vincent Hanquez
2010-05-07 13:39 ` Christoph Egger
0 siblings, 1 reply; 5+ messages in thread
From: Vincent Hanquez @ 2010-05-07 12:49 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com
On 07/05/10 13:13, Christoph Egger wrote:
>
> Hi!
>
> Attached patch adds support for NetBSD to ocaml xenstore.
>
> Signed-off-by: Christoph Egger<Christoph.Egger@amd.com>
Hi Christoph,
This is just compilation support though. I suspect the xc bindings where
we have a duplicated libxc library need to be patch for netbsd support
too (as similar as xc_netbsd.c).
--
Vincent
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ocaml NetBSD support
2010-05-07 12:49 ` Vincent Hanquez
@ 2010-05-07 13:39 ` Christoph Egger
2010-05-07 14:42 ` Christoph Egger
2010-05-07 14:45 ` Vincent Hanquez
0 siblings, 2 replies; 5+ messages in thread
From: Christoph Egger @ 2010-05-07 13:39 UTC (permalink / raw)
To: Vincent Hanquez; +Cc: xen-devel@lists.xensource.com
On Friday 07 May 2010 14:49:22 Vincent Hanquez wrote:
> On 07/05/10 13:13, Christoph Egger wrote:
> > Hi!
> >
> > Attached patch adds support for NetBSD to ocaml xenstore.
> >
> > Signed-off-by: Christoph Egger<Christoph.Egger@amd.com>
>
> Hi Christoph,
>
> This is just compilation support though. I suspect the xc bindings where
> we have a duplicated libxc library need to be patch for netbsd support
> too (as similar as xc_netbsd.c).
Why is libxc redundant ? Why don't you reuse the existing one?
Christoph
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ocaml NetBSD support
2010-05-07 13:39 ` Christoph Egger
@ 2010-05-07 14:42 ` Christoph Egger
2010-05-07 14:45 ` Vincent Hanquez
1 sibling, 0 replies; 5+ messages in thread
From: Christoph Egger @ 2010-05-07 14:42 UTC (permalink / raw)
To: xen-devel; +Cc: Vincent Hanquez
On Friday 07 May 2010 15:39:32 Christoph Egger wrote:
> On Friday 07 May 2010 14:49:22 Vincent Hanquez wrote:
> > On 07/05/10 13:13, Christoph Egger wrote:
> > > Hi!
> > >
> > > Attached patch adds support for NetBSD to ocaml xenstore.
> > >
> > > Signed-off-by: Christoph Egger<Christoph.Egger@amd.com>
> >
> > Hi Christoph,
> >
> > This is just compilation support though. I suspect the xc bindings where
> > we have a duplicated libxc library need to be patch for netbsd support
> > too (as similar as xc_netbsd.c).
>
> Why is libxc redundant ? Why don't you reuse the existing one?
Vencent: What is wrong with having an ocaml language binding on top
of libxc ? That will gain portibility automatically.
Christoph
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ocaml NetBSD support
2010-05-07 13:39 ` Christoph Egger
2010-05-07 14:42 ` Christoph Egger
@ 2010-05-07 14:45 ` Vincent Hanquez
1 sibling, 0 replies; 5+ messages in thread
From: Vincent Hanquez @ 2010-05-07 14:45 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xensource.com
On 07/05/10 14:39, Christoph Egger wrote:
> Why is libxc redundant ? Why don't you reuse the existing one?
we want to get rid of the redundant copy, but its not as simple as it
looks. there's some unfortunate interactions with ocaml and pthread and
we have found the hard way in the past, that they don't mix really well.
--
Vincent
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-07 14:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07 12:13 [PATCH] ocaml NetBSD support Christoph Egger
2010-05-07 12:49 ` Vincent Hanquez
2010-05-07 13:39 ` Christoph Egger
2010-05-07 14:42 ` Christoph Egger
2010-05-07 14:45 ` Vincent Hanquez
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).