From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Vincent Bernardoff <vb@luminar.eu.org>
Cc: AL13N <alien@rmail.be>, Ian Jackson <Ian.Jackson@eu.citrix.com>,
"Vincent Bernardoff (Intern)" <vincent.bernardoff@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tools/ocaml: Fix library generation
Date: Mon, 8 Apr 2013 18:31:19 +0100 [thread overview]
Message-ID: <5162FEE7.60303@citrix.com> (raw)
In-Reply-To: <1365441966-31732-1-git-send-email-vb@luminar.eu.org>
On 08/04/13 18:26, Vincent Bernardoff wrote:
> From: Vincent Bernardoff <vincent.bernardoff@citrix.com>
>
> Fix the commands given to the OCaml compiler to make the OCaml
> bindings to Xen usable outside the build environment.
>
> Signed-off-by: Vincent Bernardoff <vincent.bernardoff@citrix.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Ian: This supersedes the precurser of this patch in the thread "ocaml
bindings" and my patch by the same name.
> ---
> tools/Rules.mk | 8 ++++----
> tools/ocaml/Makefile.rules | 6 +++---
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/tools/Rules.mk b/tools/Rules.mk
> index 8d55e03..91a5d02 100644
> --- a/tools/Rules.mk
> +++ b/tools/Rules.mk
> @@ -20,15 +20,15 @@ XEN_LIBVCHAN = $(XEN_ROOT)/tools/libvchan
> CFLAGS_xeninclude = -I$(XEN_INCLUDE)
>
> CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
> -LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl.so
> +LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
> SHLIB_libxenctrl = -Wl,-rpath-link=$(XEN_LIBXC)
>
> CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
> -LDLIBS_libxenguest = $(XEN_LIBXC)/libxenguest.so
> +LDLIBS_libxenguest = -L$(XEN_LIBXC) -lxenguest
> SHLIB_libxenguest = -Wl,-rpath-link=L$(XEN_LIBXC)
>
> CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_xeninclude)
> -LDLIBS_libxenstore = $(XEN_XENSTORE)/libxenstore.so
> +LDLIBS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
> SHLIB_libxenstore = -Wl,-rpath-link=$(XEN_XENSTORE)
>
> CFLAGS_libxenstat = -I$(XEN_LIBXENSTAT)
> @@ -56,7 +56,7 @@ SHLIB_libblktapctl =
> endif
>
> CFLAGS_libxenlight = -I$(XEN_XENLIGHT) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
> -LDLIBS_libxenlight = $(XEN_XENLIGHT)/libxenlight.so $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libblktapctl)
> +LDLIBS_libxenlight = -L$(XEN_XENLIGHT) -lxenlight $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libblktapctl)
> SHLIB_libxenlight = -Wl,-rpath-link=$(XEN_XENLIGHT)
>
> CFLAGS += -D__XEN_TOOLS__
> diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules
> index ff19067..28b81a9 100644
> --- a/tools/ocaml/Makefile.rules
> +++ b/tools/ocaml/Makefile.rules
> @@ -45,7 +45,7 @@ ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $(ALL_OCAML_OBJS))
> $(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli $o,MLDEP,)
>
> clean: $(CLEAN_HOOKS)
> - $(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make
> + $(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make META
>
> quiet-command = $(if $(V),$1,@printf " %-8s %s\n" "$2" "$3" && $1)
>
> @@ -54,7 +54,7 @@ mk-caml-lib-bytecode = $(call quiet-command, $(OCAMLC) $(OCAMLCFLAGS) -a -o $1 $
>
> mk-caml-stubs = $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a` $2,MKLIB,$1)
> mk-caml-lib-stubs = \
> - $(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//'` $2,MKLIB,$1)
> + $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//'` $2 $3,MKLIB,$1)
>
> # define a library target <name>.cmxa and <name>.cma
> define OCAML_LIBRARY_template
> @@ -65,7 +65,7 @@ define OCAML_LIBRARY_template
> $(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,$$@, $$+)
> + $(call mk-caml-lib-stubs,$$@, $$+, $(foreach lib,$(LIBS_$(1)),$(lib)))
> endef
>
> define OCAML_NOC_LIBRARY_template
next prev parent reply other threads:[~2013-04-08 17:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 17:26 [PATCH] tools/ocaml: Fix library generation Vincent Bernardoff
2013-04-08 17:31 ` Andrew Cooper [this message]
2013-04-09 14:30 ` [PATCH] tools/ocaml: Fix library generation [and 1 more messages] Ian Jackson
2013-04-09 14:50 ` Andrew Cooper
2013-04-09 15:10 ` Ian Jackson
2013-04-10 11:32 ` Ian Campbell
2013-04-10 11:33 ` Ian Campbell
2013-04-10 12:01 ` Andrew Cooper
2013-04-10 12:07 ` Ian Campbell
-- strict thread matches above, loose matches on Subject: below --
2013-04-03 18:02 [PATCH] tools/ocaml: Fix library generation Andrew Cooper
2013-04-08 15:58 ` Ian Jackson
2013-04-10 15:22 ` Ian Campbell
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=5162FEE7.60303@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=alien@rmail.be \
--cc=vb@luminar.eu.org \
--cc=vincent.bernardoff@citrix.com \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.