[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file |
Date: |
Tue, 10 Jan 2017 16:51:05 +0000 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Tue, Jan 10, 2017 at 04:37:13PM +0000, Stefan Hajnoczi wrote:
> On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
> > diff --git a/io/channel-buffer.c b/io/channel-buffer.c
> > index 43d7959..b4e50d6 100644
> > --- a/io/channel-buffer.c
> > +++ b/io/channel-buffer.c
> > @@ -22,7 +22,7 @@
> > #include "io/channel-buffer.h"
> > #include "io/channel-watch.h"
> > #include "qemu/sockets.h"
> > -#include "trace.h"
> > +#include "io/trace.h"
>
> Is this change necessary?
>
> I think the per-subdir trace.h file should be generated in
> $BUILD_DIR/<sub-dir>/trace.h and gcc -I. can locate that file.
It doesn't work with builddir != srcdir builds, because -I. is resolved
to the srcdir, but the trace.h is in builddir. The -I$BUILDDIR<sub-dir>
is also added to the compiler search path, but it is after pretty much
all other search paths. The end result is that if you simply use
"trace.h" instad of "io/trace.h" you'll end up finding the trace.h
from the top level source directory, instead of from your subdir.
I think the include path should probably be changed such that the
-IBUILDDIR/<subdir> is immediately after -I., and I tried to make
such a change, but failed to come up with a simple patch that worked.
In the end I thought it would be clearer to be explicit about the
subdir we're pulling trace.h from anyway, since it is fairly common
practice in QEMU to have the <subdir> in the #include filename.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
- [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file, Daniel P. Berrange, 2017/01/06
- [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/06
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Stefan Hajnoczi, 2017/01/10
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file,
Daniel P. Berrange <=
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Paolo Bonzini, 2017/01/10
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/10
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Paolo Bonzini, 2017/01/10
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/11
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/11
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Paolo Bonzini, 2017/01/11
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Eric Blake, 2017/01/10
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Paolo Bonzini, 2017/01/10
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Stefan Hajnoczi, 2017/01/11
- Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file, Daniel P. Berrange, 2017/01/11