qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lee Essen <lee.essen@nowonline.co.uk>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>,
	"Stefan Hajnoczi" <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] Thoughts around dtrace linking...
Date: Mon, 26 Mar 2012 16:28:05 +0100	[thread overview]
Message-ID: <4F708B05.1030702@nowonline.co.uk> (raw)
In-Reply-To: <CAJSP0QW35WeS80tvKWu4fUR=ENG3hiyhzQXfoh52UewMehGhJQ@mail.gmail.com>

On 26/03/2012 11:14, Stefan Hajnoczi wrote:
> On Fri, Mar 23, 2012 at 2:11 PM, Lee Essen<lee.essen@nowonline.co.uk>  wrote:
>>
>> On 23 Mar 2012, at 08:08, Stefan Hajnoczi wrote:
>>
>>> On Thu, Mar 22, 2012 at 05:00:53PM +0000, Lee Essen wrote:
>>>> On 22/03/2012 16:28, Stefan Hajnoczi wrote:
>>>>> On Wed, Mar 21, 2012 at 1:01 PM, Andreas Färber<afaerber@suse.de>    wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Am 21.03.2012 11:45, schrieb Lee Essen:
>>>>>>> I've been trying to find a sensible way to solve the Solaris/Illumos
>>>>>>> dtrace requirement to pass all the objs to the dtrace command so that
>>>>>>> the resultant object file contains all the symbols needed to properly
>>>>>>> link the relevant binary.
>>>>>>>
>>>
>>> If you're able to try out the dependency-based approach that would be a
>>> good starting point.  You may hit a point where it turns out to be too
>>> ugly or complicated - in that case, please post your progress and maybe
>>> someone can help find a way to structure it.  I'm not a make guru but I
>>> can try to give feedback on your patches.
>>>
>>> Stefan
>>>
>>
>> Ok, here's an attempt … it works for me, but I'm not sure how it would work on a different dtrace platform so it will probably need some different guarding … but it shows what it will look like.
>
> The code makes sense to me.  There's a feeling that there must be a
> way to remove the duplication in this approach, but my make foo isn't
> good enough to see how.
>
> As you mentioned, we need a way to distinguish between Solaris DTrace,
> which requires the global .o linking approach, and other
> implementations.  You could use CONFIG_SOLARIS and CONFIG_TRACE_DTRACE
> together to enable the global .o linking.
>

So there is another way that's less duplicative on the non-target stuff. 
If you build all of the objects needed for ALL of the binaries, you 
could then build the dtrace object so that it was a superset, then link 
with that one in all of the final binary linking.

To be honest I think it's probably more confusing to do that, the 
previous approach is more duplicative but easier to follow.

Let me pull a full patch together and see what people think.

Lee.

      reply	other threads:[~2012-03-26 15:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 10:45 [Qemu-devel] Thoughts around dtrace linking Lee Essen
2012-03-21 13:01 ` Andreas Färber
2012-03-21 13:37   ` Lee Essen
2012-03-22 16:28   ` Stefan Hajnoczi
2012-03-22 17:00     ` Lee Essen
2012-03-23  8:08       ` Stefan Hajnoczi
2012-03-23 14:11         ` Lee Essen
2012-03-26 10:14           ` Stefan Hajnoczi
2012-03-26 15:28             ` Lee Essen [this message]

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=4F708B05.1030702@nowonline.co.uk \
    --to=lee.essen@nowonline.co.uk \
    --cc=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).