qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] pass $($*.o-cflags) first to gcc/g++


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] pass $($*.o-cflags) first to gcc/g++
Date: Wed, 09 Jul 2014 23:11:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Il 09/07/2014 22:34, Stefano Stabellini ha scritto:
rules.mak adds cflags specific to the target source file ($(address@hidden))
for last on the compiler command line.

As a consequence when compiling arm-a64.o, g++ might end up picking the
wrong utils.h header file, because it looks for utils.h on all the other
include paths first.

Fix the issue by passing the source file specific cflags first.
Do it consisently for *.c, *.cc, etc.

Signed-off-by: Stefano Stabellini <address@hidden>

You can just as well have a bug that requires you to put the option last (for example adding -Wno-something or -O0), which is why $(address@hidden)/$($*.o-cflags) comes last.

What package is it that has the conflicting utils.h file? Any chance to get it fixed in your distro? Here I get:

$ find /usr/include/ -name utils.h
/usr/include/libnl3/netlink/utils.h
/usr/include/libnl3/netlink/cli/utils.h
/usr/include/id3/utils.h
/usr/include/octave-3.6.4/octave/utils.h

but none of them have the path in -I.

Paolo



reply via email to

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