[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] tools: ocaml: do not try to link dynamic objects into .a libraries



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1300976665 0
# Node ID 32f2fffe8e2e0e2722d00a116adb28bdaa1aaabe
# Parent  ca75b204dca4339dcdca4124bd010abe6604f616
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>

diff -r ca75b204dca4 -r 32f2fffe8e2e tools/ocaml/Makefile.rules
--- a/tools/ocaml/Makefile.rules        Thu Mar 24 14:09:45 2011 +0000
+++ b/tools/ocaml/Makefile.rules        Thu Mar 24 14:24:25 2011 +0000
@@ -54,7 +54,7 @@ mk-caml-lib-bytecode = $(call quiet-comm
 
 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.