WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] tools: ocaml: do not try to link dynamic objects int

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] tools: ocaml: do not try to link dynamic objects into .a libraries
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 24 Mar 2011 14:28:49 +0000
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Thu, 24 Mar 2011 07:30:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>