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

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

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? Here I get:

$ find /usr/include/ -name utils.h

but none of them have the path in -I.


Xen-devel mailing list



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