qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH][Tracing] Fix for make parallelization.


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] Re: [PATCH][Tracing] Fix for make parallelization.
Date: Mon, 28 Jun 2010 15:00:11 +0100

On Mon, Jun 28, 2010 at 2:46 PM, Stefan Hajnoczi
<address@hidden> wrote:
> On Mon, Jun 28, 2010 at 06:02:37PM +0530, Prerna Saxena wrote:
>> [PATCH] Restore parallel building
>> This is based on :
>> http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/tracing
>>
>> Signed-off-by: Prerna Saxena <address@hidden>
>
> Dependencies are not quite right yet:
>
> $ make distclean
> $ ./configure --trace-backend=simple
> $ make V=1 trace.o
> sh /home/stefanha/qemu/tracetool --simple -c < 
> /home/stefanha/qemu/trace-events > trace.c
> sh /home/stefanha/qemu/tracetool --simple -h < 
> /home/stefanha/qemu/trace-events > trace.h
> gcc -I/home/stefanha/qemu/slirp -Werror -m64 -fstack-protector-all 
> -Wold-style-definition -Wold-style-declaration -I. -I/home/stefanha/qemu 
> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
> -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels 
> -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing   -MMD -MP -MT 
> trace.o -MF ./trace.d -O2 -g  -c -o trace.o trace.c
> In file included from trace.h:6,
>                 from trace.c:2:
> qemu-common.h:5:25: error: config-host.h: No such file or directory
> In file included from trace.h:6,
>                 from trace.c:2:
> qemu-common.h:61: error: redefinition of ‘struct iovec’
> make: *** [trace.o] Error 1
>
> I have applied it for now, however, because the implicit dependencies issue 
> affects all of QEMU and was not caused by tracing code:

Can someone explain how the build system uses dependency rules?  From
what I can tell the dependencies are generated during compilation.  In
rules.mak:

# Flags for dependency generation
QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d

%.o: %.c
        $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_DGFLAGS)
$(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")

I would have expected one pass to build dependencies, then the
dependency rules are sourced into make, then the code is built.  Isn't
it too late to generate dependencies when compiling the object file?

It looks like GENERATED_HEADERS is used to add explicit dependencies
on config-host.h and config-target.h.  trace.o should depend on
$(GENERATED_HEADERS).

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]