[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] only link current target arch traces to qemu-sy
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] only link current target arch traces to qemu-system |
Date: |
Thu, 23 Mar 2017 09:05:16 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Wed, Mar 22, 2017 at 02:37:21PM +0100, Paolo Bonzini wrote:
>
>
> On 22/03/2017 03:03, Xu, Anthony wrote:
> > When building target x86_64-softmmu, all other architectures' trace.o are
> > linked into
> > x86_64-softmmu/qemu-system-x86_64, like hw/arm/trace.o, hw/mips/trace.o
> > etc.,
> > that is not necessary.
> > Same thing happens when building other targets.
> >
> > Only current target arch traces should be linked into qemu-system.
> >
> > Signed-off -by: Anthony Xu <address@hidden>
>
> It's a bit cleaner, but does the benefit outweight the maintenance cost
> of the additional code added to the Makefiles?
Perhaps all trace.o files should be put into their own .a instead of
being added directly to the linker line:
COMMON_LDADDS = $(trace-obj-y) libqemuutil.a libqemustub.a
I think the linker would only pull in .o files containing symbols that are
actually referenced by the program.
It would look like this:
######################################################################
# Build libraries
libqemustub.a: $(stub-obj-y)
libqemuutil.a: $(util-obj-y)
libqemutrace.a: $(trace-obj-y)
######################################################################
COMMON_LDADDS = libqemuutil.a libqemustub.a libqemutrace.a
This eliminates the maintenance burden with Anthony's patch.
Stefan
signature.asc
Description: PGP signature