mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
3c428f3e27
commit
bce637c6e4
1 file changed
+2
-2
@@ -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
|
||||
|
||||