Received: from eggs.gnu.org ([208.118.235.92]:46826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCBq8-0008SW-FW for qemu-devel@nongnu.org; Mon, 26 Mar 2012 11:28:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCBq3-0004Y1-AL for qemu-devel@nongnu.org; Mon, 26 Mar 2012 11:28:12 -0400 Received: from 204.146.238.178.in-addr.arpa ([178.238.146.204]:58099 helo=mail.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCBq3-0004XP-2n for qemu-devel@nongnu.org; Mon, 26 Mar 2012 11:28:07 -0400 Message-ID: <4F708B05.1030702@nowonline.co.uk> Date: Mon, 26 Mar 2012 16:28:05 +0100 From: Lee Essen MIME-Version: 1.0 References: <4F69B137.3070709@nowonline.co.uk> <4F69D142.7020307@suse.de> <4F6B5AC5.9020504@nowonline.co.uk> <20120323080843.GA21619@stefanha-thinkpad.localdomain> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Thoughts around dtrace linking... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, =?windows-1252?Q?Andreas_F=E4rber?= , Stefan Hajnoczi On 26/03/2012 11:14, Stefan Hajnoczi wrote: > On Fri, Mar 23, 2012 at 2:11 PM, Lee Essen = 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=E4rber= wrote: >>>>>> Hi, >>>>>> >>>>>> Am 21.03.2012 11:45, schrieb Lee Essen: >>>>>>> I've been trying to find a sensible way to solve the Solaris/Illu= mos >>>>>>> dtrace requirement to pass all the objs to the dtrace command so = that >>>>>>> the resultant object file contains all the symbols needed to prop= erly >>>>>>> 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 to= o >>> ugly or complicated - in that case, please post your progress and may= be >>> 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 =85 it works for me, but I'm not sure how it wou= ld work on a different dtrace platform so it will probably need some diff= erent guarding =85 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.=20 If you build all of the objects needed for ALL of the binaries, you=20 could then build the dtrace object so that it was a superset, then link=20 with that one in all of the final binary linking. To be honest I think it's probably more confusing to do that, the=20 previous approach is more duplicative but easier to follow. Let me pull a full patch together and see what people think. Lee.