qemu-ga: Fix linux build with trace backend
PATCH 1/1 qemu-ga: Fix linux build with trace backend
Builds with configure --enable-trace-backend=simple failed on linux because qemu-ga then uses simpletrace.c which needs get_clock which needs use_rt_clock which was unresolved.
Adding qemu-timer-common.o fixes this. It adds a little overhead (about 150 byte).
--- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
@@ -197,7 +197,7 @@ QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi- $(QGALIB_GEN): $(GENERATED_HEADERS) $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) -qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(qapi-obj-y) $(trace-obj-y) $(qobject-obj-y) $(version-obj-y) $(addprefix $(qapi-dir)/, qga-qapi-visit.o qga-qapi-types.o qga-qmp-marshal.o) +qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(qapi-obj-y) $(trace-obj-y) qemu-timer-common.o $(qobject-obj-y) $(version-obj-y) $(addprefix $(qapi-dir)/, qga-qapi-visit.o qga-qapi-types.o qga-qmp-marshal.o) QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
Signature · 1 line
1.7.2.5
Quoted 6 lines · Stefan Weil
Builds with configure --enable-trace-backend=simple failed on linux because qemu-ga then uses
simpletrace.cwhich needsget_clockwhich needsuse_rt_clockwhich was unresolved.Adding qemu-timer-common.o fixes this. It adds a little overhead (about 150 byte).
There are a couple of threads associated to this very same topic:
http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg02915.html
http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg03302.html
Lluis
Signature · 4 lines
"And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth
Am 29.08.2011 20:32, schrieb Lluís:
Quoted 7 lines
Quoted 5 lines · Stefan Weil
Builds with configure --enable-trace-backend=simple failed on linux because qemu-ga then uses
simpletrace.cwhich needsget_clockwhich needsuse_rt_clockwhich was unresolved.
Adding qemu-timer-common.o fixes this. It adds a little overhead (about 150 byte).
Quoted 6 lines
There are a couple of threads associated to this very same topic:
http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg02915.html
http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg03302.htmlLluis
Thanks for the links. So we now have three patch sets for one problem, and it will be fixed by a maintainer commit soon :-)
I personally prefer Blue Swirl's patch (which avoids the overhead) or my own patch (which adds a little overhead but is the simplest of all three patches). Sorting lists of object files and removing duplicates looks strange in my opinion (and might also be bad when related code no longer shares the same memory page).
With my patch, qemu-ga and the other tools (qemu-io, qemu-img, ...) also use similar object lists.
Kind regards,
Stefan
Quoted 10 lines · Stefan Weil
Am 29.08.2011 20:32, schrieb Lluís:
Quoted 9 lines
Quoted 5 lines · Stefan Weil
Builds with configure --enable-trace-backend=simple failed on linux because qemu-ga then uses
simpletrace.cwhich needsget_clockwhich needsuse_rt_clockwhich was unresolved.
Adding qemu-timer-common.o fixes this. It adds a little overhead (about 150 byte).There are a couple of threads associated to this very same topic:
Quoted 8 lines
Quoted 4 lines
http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg02915.html
http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg03302.htmlLluis
Thanks for the links. So we now have three patch sets for one problem, and it will be fixed by a maintainer commit soon :-)
4, actually :) An alternative proposal from Blue was setting CONFIG_QEMU_TIMER based on whether or not qemu-timer-common.o was needed for a particular dependency, so anyone dependent on, say, trace-obj-y could just have:
blah-obj-$(CONFIG_QEMU_TIMER) += qemu-timer-common.o
I CC'd you on the patch.
Quoted 6 lines
I personally prefer Blue Swirl's patch (which avoids the overhead) or my own patch (which adds a little overhead but is the simplest of all three patches). Sorting lists of object files and removing duplicates looks strange in my opinion (and might also be bad when related code no longer shares the same memory page).
I actually preferred the sorted list approach, I think it mirrors how most projects handle duplicate header includes and allows for defining a self-sufficient group of objects without needed to worry whether 2 groups list the same object as a dependency. This allows results in one group being underspecified and any subsequent user of that group to be aware of what's missing.
Quoted 8 lines
With my patch, qemu-ga and the other tools (qemu-io, qemu-img, ...) also use similar object lists.
Kind regards,
Stefan