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

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



On 9 July 2014 22:11, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> Il 09/07/2014 22:34, Stefano Stabellini ha scritto:
>
>> rules.mak adds cflags specific to the target source file ($($@-cflags))
>> 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 <stefano.stabellini@xxxxxxxxxxxxx>
>
>
> 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
> $($@-cflags)/$($*.o-cflags) comes last.
>
> What package is it that has the conflicting utils.h file?  Any chance to get
> it fixed in your distro?

Yeah, at this point we run beyond what's reasonable to fix
in QEMU, and you need to fix your Xen build process.
As I recall from IRC, this is purely because the way Xen
builds QEMU involves them manually adding a directory
to the include path which is actually the source tree of
some Xen tool or other. That should be fixed so that the
relevant Xen headers get installed somewhere and then
you point the QEMU build at the installed headers.

(I've also suggested that libvixl makes these rather generic headers
live in a subdir to avoid the clash from that end, but I don't
expect that will make it through to a released libvixl and then
into QEMU for a while yet.)

thanks
-- PMM

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.