From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Peter Maydell <peter.maydell@linaro.org>
Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pass $($*.o-cflags) first to gcc/g++
Date: Wed, 09 Jul 2014 23:11:15 +0200 [thread overview]
Message-ID: <53BDAFF3.1080007@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1407092049550.29039@kaball.uk.xensource.com>
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@eu.citrix.com>
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
/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
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Peter Maydell <peter.maydell@linaro.org>
Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org
Subject: Re: [PATCH] pass $($*.o-cflags) first to gcc/g++
Date: Wed, 09 Jul 2014 23:11:15 +0200 [thread overview]
Message-ID: <53BDAFF3.1080007@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1407092049550.29039@kaball.uk.xensource.com>
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@eu.citrix.com>
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
/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
next prev parent reply other threads:[~2014-07-09 21:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 20:34 [Qemu-devel] [PATCH] pass $($*.o-cflags) first to gcc/g++ Stefano Stabellini
2014-07-09 20:34 ` Stefano Stabellini
2014-07-09 21:11 ` Paolo Bonzini [this message]
2014-07-09 21:11 ` Paolo Bonzini
2014-07-09 21:56 ` [Qemu-devel] " Peter Maydell
2014-07-09 21:56 ` Peter Maydell
2014-07-09 21:59 ` [Qemu-devel] " Stefano Stabellini
2014-07-09 21:59 ` Stefano Stabellini
2014-07-09 22:12 ` [Qemu-devel] " Paolo Bonzini
2014-07-09 22:12 ` Paolo Bonzini
2014-07-10 11:19 ` [Qemu-devel] " Stefano Stabellini
2014-07-10 11:19 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BDAFF3.1080007@redhat.com \
--to=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.