# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1301594826 -3600
# Node ID b056c3850c78a73304a41f86d72bbfca843533d7
# Parent 7f894a4cf702e806c21d5dc9aa106752311dce91
tools: ocaml: do not try to link dynamic objects into .a libraries
lib<foo>_stubs.a was linking against $(LIBS_<foo>) which only includes
dynamic linkage information which is not useful for a static library.
$(LIBS_<foo>) is still used when linking <foo>.cmxa
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
diff -r 7f894a4cf702 -r b056c3850c78 tools/ocaml/Makefile.rules
--- a/tools/ocaml/Makefile.rules Thu Mar 31 19:04:19 2011 +0100
+++ b/tools/ocaml/Makefile.rules Thu Mar 31 19:07:06 2011 +0100
@@ -54,7 +54,7 @@
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//'` $3 $2,MKLIB,$1)
+ $(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -o `basename $1
.a | sed -e 's/^lib//'` $2,MKLIB,$1)
# define a library target <name>.cmxa and <name>.cma
define OCAML_LIBRARY_template
@@ -65,7 +65,7 @@
$(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)))
+ $(call mk-caml-lib-stubs,$$@, $$+)
endef
define OCAML_NOC_LIBRARY_template
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|