[Pkg-xen-devel] [PATCH 6/7] Create 2 ocaml packages, libxen-4.1-ocaml and libxen-4.1-ocaml-dev.

Ian Campbell ijc at hellion.org.uk
Fri Nov 25 16:30:49 UTC 2011


On Fri, 2011-11-25 at 17:17 +0100, Bastian Blank wrote:
> > +--- a/tools/ocaml/libs/xc/Makefile
> > ++++ b/tools/ocaml/libs/xc/Makefile
> > +@@ -9,7 +9,8 @@
> > + INTF = xenctrl.cmi
> > + LIBS = xenctrl.cma xenctrl.cmxa
> > + 
> > +-LIBS_xenctrl = -L$(XEN_ROOT)/tools/libxc -lxenctrl -lxenguest
> > ++LIBS_xenctrl = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest)
> > ++LIBS_xenctrl_SYSTEM = $(LDLIBS_libxenctrl_SYSTEM) $(LDLIBS_libxenguest_SYSTEM)
> 
> Why? Every linker have to support shared object files.

This isn't about shared vs non-shared but rather about linking the
version in tree which you just build vs the version installed
in /usr/lib.

ocaml is a bit odd in this respect. A linker command line is given when
you link an ocaml library and is baked into the binary and subsequently
reused when you link against that library.

However we want to link some ocaml stuff in tree (so against the
libraries in the build tree, using $(XEN_ROOT)/path/to/libfoo.so) but to
also have the installed libraries be useful when installed on the system
(and therefore link against the version in /usr/lib using -lfoo). Since
we can't bake both into the library we have to do things this way.

Ian.

-- 
Ian Campbell

Their idea of an offer you can't refuse is an offer... and you'd better
not refuse.




More information about the Pkg-xen-devel mailing list