]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
tools: ocaml: do not try to link dynamic objects into .a libraries
authorIan Campbell <ian.campbell@citrix.com>
Thu, 31 Mar 2011 18:07:06 +0000 (19:07 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 31 Mar 2011 18:07:06 +0000 (19:07 +0100)
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@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/ocaml/Makefile.rules

index c63076456928edab490419ba6b2d17799b0e43c7..b669764fe6421cc2aadb8c613432e0191c7bdce7 100644 (file)
@@ -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//'` $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 @@ 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,$$@, $$+, $(LIBS_$(1)))
+       $(call mk-caml-lib-stubs,$$@, $$+)
 endef
 
 define OCAML_NOC_LIBRARY_template