[Pkg-xen-devel] [PATCH 6/9] Fix the ocaml libraries to install correctly under /usr/lib/xen-4.1/lib/ocaml

Ian Campbell ijc at hellion.org.uk
Tue Oct 25 14:57:20 UTC 2011


I'm assuming that this "OCAMLMKLIB" tool takes care of creating the cmxa
and stubs etc?

Is this something we want upstream?

Is $(XEN_VERSION) not available here?

The next patch in the series (add the comments to this new file) could
be merged into this one.

Ian.

On Tue, 2011-10-25 at 13:37 +0100, Jon Ludlam wrote:
> ---
>  xen/debian/patches/series                     |    1 +
>  xen/debian/patches/tools-ocaml-fix-rpath.diff |   20 ++++++++++++++++++++
>  2 files changed, 21 insertions(+), 0 deletions(-)
>  create mode 100644 xen/debian/patches/tools-ocaml-fix-rpath.diff
> 
> diff --git a/xen/debian/patches/series b/xen/debian/patches/series
> index c72ea3c..564dd62 100644
> --- a/xen/debian/patches/series
> +++ b/xen/debian/patches/series
> @@ -59,3 +59,4 @@ tools-ocaml-fix-xc-dependencies.diff
>  tools-ocaml-remove-uuid.diff
>  tools-ocaml-remove-log.diff
>  tools-ocaml-fix-xc.diff
> +tools-ocaml-fix-rpath.diff
> diff --git a/xen/debian/patches/tools-ocaml-fix-rpath.diff b/xen/debian/patches/tools-ocaml-fix-rpath.diff
> new file mode 100644
> index 0000000..760476a
> --- /dev/null
> +++ b/xen/debian/patches/tools-ocaml-fix-rpath.diff
> @@ -0,0 +1,20 @@
> +--- a/tools/ocaml/Makefile.rules
> ++++ b/tools/ocaml/Makefile.rules
> +@@ -58,14 +58,9 @@
> + 
> + # define a library target <name>.cmxa and <name>.cma
> + define OCAML_LIBRARY_template
> +- $(1).cmxa: lib$(1)_stubs.a $(foreach obj,$($(1)_OBJS),$(obj).cmx)
> +-	$(call mk-caml-lib-native,$$@, -cclib -l$(1)_stubs $(foreach lib,$(LIBS_$(1)),-cclib $(lib)), $(foreach obj,$($(1)_OBJS),$(obj).cmx))
> +- $(1).cma: $(foreach obj,$($(1)_OBJS),$(obj).cmo)
> +-	$(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib -l$(1)_stubs, $$+)
> +- $(1)_stubs.a: $(foreach obj,$$($(1)_C_OBJS),$(obj).o)
> +-	$(call mk-caml-stubs,$$@, $$+)
> +- lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o)
> +-	$(call mk-caml-lib-stubs,$$@, $$+, $(LIBS_$(1)))
> ++ $(1).cma: $(foreach obj,$($(1)_OBJS),$(obj).cmx $(obj).cmo) $(foreach obj,$($(1)_C_OBJS),$(obj).o) 
> ++	$(OCAMLMKLIB) -o $1 -oc $(1)_stubs $(foreach obj,$($(1)_OBJS),$(obj).cmx $(obj).cmo) -L/usr/lib/xen-4.1/lib -ccopt -Wl,-R/usr/lib/xen-4.1/lib/ocaml/stublibs -ccopt -Wl,-R/usr/lib/xen-4.1/lib $(foreach obj,$($(1)_C_OBJS),$(obj).o) $(LIBS_$(1))
> ++	gcc -shared -o ./dll$(1)_stubs.so $(foreach obj,$($(1)_C_OBJS),$(obj).o) -L/usr/lib/xen-4.1/lib -L../../../../tools/libxc  $(LIBS_$(1)) -Wl,-R/usr/lib/xen-4.1/lib
> + endef
> + 
> + define OCAML_NOC_LIBRARY_template

-- 
Ian Campbell

"You, sir, are nothing but a pathetically lame salesdroid!
I fart in your general direction!"
		-- Randseed on #Linux




More information about the Pkg-xen-devel mailing list