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] Re: [PATCH 5 of 7] [OCAML] Minor makefile cleanup

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [PATCH 5 of 7] [OCAML] Minor makefile cleanup
From: Zheng Li <zheng.li@xxxxxxxxxxxxx>
Date: Fri, 30 Sep 2011 17:43:30 +0100
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx>
Delivery-date: Fri, 30 Sep 2011 09:44:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1317369085.26672.212.camel@xxxxxxxxxxxxxxxxxxxxxx>
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>
References: <patchbomb.1317331042@xxxxxxxxxxxxxxxxxxxxxxxxxx> <48d4f312d0693cf8a52e.1317331047@xxxxxxxxxxxxxxxxxxxxxxxxxx> <1317369085.26672.212.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0) Gecko/20110927 Thunderbird/7.0
Hello,

On 30/09/2011 08:51, Ian Campbell wrote:
What does the cleanup actually do?

IIRC, the patch meant to do 2 things:

* A small improvement (in two occasions)

E.g., for make rule

lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o)

substitute the action part from

        $(call mk-caml-lib-stubs,$$@, $$+)

to

        $(call mk-caml-lib-stubs,$(1), $$+)

i.e. pass part of the target's name as the argument to mk-caml-lib-stubs 
instead of the whole name, so that we can avoid calling basename and sed later 
on to recover the sub string. I.e.,

from

        $(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -o `basename $1 
.a | sed -e 's/^lib//'` $2,MKLIB,$1)

to

        $(call quiet-command, $(AR) rcs lib$(1)_stubs.a $2 && $(OCAMLMKLIB) 
$(LIBS_$(1)) -o $(1)_stubs $2,MKLIB,$1)


* Some correction on linking parameters for bytecode mode compilation

IIRC, it's this line that changed from

        $(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib 
-l$(1)_stubs, $$+)

to

        $(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib 
-l$(1)_stubs $(foreach lib,$(LIBS_$(1)),-cclib $(lib)), $$+)

The former was able to produce bytecode as well, but there would be problem in 
dynamic loading the generated bytecode (e.g. in OCaml toplevel). The later 
version should work fine with the toplevel.
-LIBS_evtchn = $(LDLIBS_libxenctrl)
+LIBS_eventchn = -L$(XEN_ROOT)/tools/libxc -lxenctrl

This should continue using LDLIBS_libxenctrl unless there is a good
reason not too.

I think you are right. They are identical, only the name in the first line 
needs fixing, and using predefined $(LDLIBS_libxenctrl) is certainly better. 
The change dated back before your Makefile refactoring after Xen-4.1 and was 
probably a result of mix up during rebase.

Cheers
--
Zheng




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

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