qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.12 2/2] make: switch from -I to -iquote


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH for-2.12 2/2] make: switch from -I to -iquote
Date: Thu, 22 Mar 2018 21:20:35 +0000
User-agent: Mutt/1.9.2 (2017-12-15)

On Wed, Mar 21, 2018 at 05:22:07PM +0200, Michael S. Tsirkin wrote:
> Our rule right now is to use <> for external headers,
> "" for internal ones. The idea was to avoid conflicts
> between e.g. a system file named <trace.h> and an
> internal one by the same name.
> 
> Unfortunately we use -I compiler flag so it does not
> help: a system file doing #include <trace.h> will
> still pick up ours first.
> 
> To fix, switch to -iquote which is supported by both
> gcc and clang and only affects #include "" directives.
> 
> As a side effect, this catches any future uses of
>  #include <> for internal headers.
> 
> Suggested-by: Stefan Weil <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
> 
> I still think we want to switch to a more formal rule such as qemu/
> prefix for all includes down the road, but this will at least catch any
> scheme violations from creeping in meanwhile.
> 
> 
>  configure       | 16 ++++++++--------
>  rules.mak       |  2 +-
>  Makefile.target |  4 ++--
>  3 files changed, 11 insertions(+), 11 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

Attachment: signature.asc
Description: PGP signature


reply via email to

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