All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zheng Li <zheng.li@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
	Jonathan Ludlam <Jonathan.Ludlam@eu.citrix.com>
Subject: Re: [PATCH 5 of 7] [OCAML] Minor makefile cleanup
Date: Fri, 30 Sep 2011 17:43:30 +0100	[thread overview]
Message-ID: <4E85F1B2.2040506@eu.citrix.com> (raw)
In-Reply-To: <1317369085.26672.212.camel@zakaz.uk.xensource.com>

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

  reply	other threads:[~2011-09-30 16:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 21:17 [PATCH 0 of 7] Ocaml related fixes/cleanups Jon Ludlam
2011-09-29 21:17 ` [PATCH 1 of 7] [OCAML] Rename the ocamlfind packages Jon Ludlam
2011-09-30  7:42   ` Ian Campbell
2011-09-30 12:19     ` Jonathan Ludlam
2011-09-30 12:35       ` Ian Campbell
2011-09-29 21:17 ` [PATCH 2 of 7] [OCAML] Remove the uuid library Jon Ludlam
2011-09-30  7:45   ` Ian Campbell
2011-09-30 12:21     ` Jonathan Ludlam
2011-09-30 12:36       ` Ian Campbell
2011-09-29 21:17 ` [PATCH 3 of 7] [OCAML] Remove log library from tools/ocaml/libs Jon Ludlam
2011-09-30  7:46   ` Ian Campbell
2011-09-29 21:17 ` [PATCH 4 of 7] [OCAML] Fix a problem with ocaml xenstored Jon Ludlam
2011-09-30  7:49   ` Ian Campbell
2011-09-30 12:22     ` Jonathan Ludlam
2011-09-30 12:50       ` Ian Campbell
2011-09-30 13:24         ` Jonathan Ludlam
2011-09-29 21:17 ` [PATCH 5 of 7] [OCAML] Minor makefile cleanup Jon Ludlam
2011-09-30  7:51   ` Ian Campbell
2011-09-30 16:43     ` Zheng Li [this message]
2011-09-29 21:17 ` [PATCH 6 of 7] [OCAML] Fix 2 bit-twiddling bugs and an off-by-one Jon Ludlam
2011-09-30  7:53   ` Ian Campbell
2011-09-29 21:17 ` [PATCH 7 of 7] [OCAML] Small improvement to the ocaml xenctrl library Jon Ludlam
2011-09-30  7:54   ` Ian Campbell
     [not found] <patchbomb.1317742227@snoosnoo2.uk.xensource.com>
2011-10-04 15:30 ` [PATCH 5 of 7] [OCAML] Minor makefile cleanup Jon Ludlam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E85F1B2.2040506@eu.citrix.com \
    --to=zheng.li@eu.citrix.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Jonathan.Ludlam@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.