From: Marc Zyngier <maz@kernel.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: x86@kernel.org, Michal Marek <michal.lkml@markovi.net>,
linux-kbuild@vger.kernel.org,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
linux-arm-kernel@lists.infradead.org,
Andy Lutomirski <luto@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH 1/2] kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)
Date: Mon, 26 Aug 2019 10:17:22 +0100 [thread overview]
Message-ID: <86sgpomgkd.wl-maz@kernel.org> (raw)
In-Reply-To: <20190825172833.5708-1-yamada.masahiro@socionext.com>
On Sun, 25 Aug 2019 18:28:32 +0100,
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
> Kbuild provides per-file compiler flag addition/removal:
>
> CFLAGS_<basetarget>.o
> CFLAGS_REMOVE_<basetarget>.o
> AFLAGS_<basetarget>.o
> AFLAGS_REMOVE_<basetarget>.o
> CPPFLAGS_<basetarget>
> HOSTCFLAGS_<basetarget>.o
> HOSTCXXFLAGS_<basetarget>.o
>
> The <basetarget> is the filename of the target without its suffix.
>
> This syntax comes into a trouble when two files with the same name
> appear in one Makefile, for example:
>
> obj-y += foo.o
> obj-y += dir/foo.o
> CFLAGS_foo.o := <some-flags>
>
> Here, the <some-flags> applies to both foo.o and dir/foo.o
>
> The real world problem is:
>
> scripts/kconfig/util.c
> scripts/kconfig/lxdialog/util.c
>
> Both files are compiled into scripts/kconfig/mconf, but only the
> latter should be given with additional flags for ncurses.
>
> It is more sensible to use the relative path to the Makefile, like this:
>
> obj-y += foo.o
> CFLAGS_foo.o := <some-flags>
> obj-y += dir/foo.o
> CFLAGS_dir/foo.o := <other-flags>
>
> The $* variable is replaced with the stem ('%') part in a pattern rule.
> In other words, this only works for pattern rules.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/arm/kvm/Makefile | 5 +++--
> arch/x86/entry/vdso/Makefile | 3 ++-
> scripts/Makefile.host | 30 +++++++++++++++---------------
> scripts/Makefile.lib | 10 +++++-----
> scripts/kconfig/Makefile | 8 ++++----
> 5 files changed, 29 insertions(+), 27 deletions(-)
For the KVM/arm part:
Acked-by: Marc Zyngier <maz@kernel.org>
Thanks,
M.
--
Jazz is not dead, it just smells funny.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-kbuild@vger.kernel.org, Andy Lutomirski <luto@kernel.org>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
Ingo Molnar <mingo@redhat.com>, James Morse <james.morse@arm.com>,
Julien Thierry <julien.thierry.kdev@gmail.com>,
Michal Marek <michal.lkml@markovi.net>,
Russell King <linux@armlinux.org.uk>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH 1/2] kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)
Date: Mon, 26 Aug 2019 10:17:22 +0100 [thread overview]
Message-ID: <86sgpomgkd.wl-maz@kernel.org> (raw)
In-Reply-To: <20190825172833.5708-1-yamada.masahiro@socionext.com>
On Sun, 25 Aug 2019 18:28:32 +0100,
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
> Kbuild provides per-file compiler flag addition/removal:
>
> CFLAGS_<basetarget>.o
> CFLAGS_REMOVE_<basetarget>.o
> AFLAGS_<basetarget>.o
> AFLAGS_REMOVE_<basetarget>.o
> CPPFLAGS_<basetarget>
> HOSTCFLAGS_<basetarget>.o
> HOSTCXXFLAGS_<basetarget>.o
>
> The <basetarget> is the filename of the target without its suffix.
>
> This syntax comes into a trouble when two files with the same name
> appear in one Makefile, for example:
>
> obj-y += foo.o
> obj-y += dir/foo.o
> CFLAGS_foo.o := <some-flags>
>
> Here, the <some-flags> applies to both foo.o and dir/foo.o
>
> The real world problem is:
>
> scripts/kconfig/util.c
> scripts/kconfig/lxdialog/util.c
>
> Both files are compiled into scripts/kconfig/mconf, but only the
> latter should be given with additional flags for ncurses.
>
> It is more sensible to use the relative path to the Makefile, like this:
>
> obj-y += foo.o
> CFLAGS_foo.o := <some-flags>
> obj-y += dir/foo.o
> CFLAGS_dir/foo.o := <other-flags>
>
> The $* variable is replaced with the stem ('%') part in a pattern rule.
> In other words, this only works for pattern rules.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/arm/kvm/Makefile | 5 +++--
> arch/x86/entry/vdso/Makefile | 3 ++-
> scripts/Makefile.host | 30 +++++++++++++++---------------
> scripts/Makefile.lib | 10 +++++-----
> scripts/kconfig/Makefile | 8 ++++----
> 5 files changed, 29 insertions(+), 27 deletions(-)
For the KVM/arm part:
Acked-by: Marc Zyngier <maz@kernel.org>
Thanks,
M.
--
Jazz is not dead, it just smells funny.
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: x86@kernel.org, Michal Marek <michal.lkml@markovi.net>,
linux-kbuild@vger.kernel.org,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
James Morse <james.morse@arm.com>,
linux-arm-kernel@lists.infradead.org,
Andy Lutomirski <luto@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
kvmarm@lists.cs.columbia.edu,
Julien Thierry <julien.thierry.kdev@gmail.com>
Subject: Re: [PATCH 1/2] kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)
Date: Mon, 26 Aug 2019 10:17:22 +0100 [thread overview]
Message-ID: <86sgpomgkd.wl-maz@kernel.org> (raw)
In-Reply-To: <20190825172833.5708-1-yamada.masahiro@socionext.com>
On Sun, 25 Aug 2019 18:28:32 +0100,
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
> Kbuild provides per-file compiler flag addition/removal:
>
> CFLAGS_<basetarget>.o
> CFLAGS_REMOVE_<basetarget>.o
> AFLAGS_<basetarget>.o
> AFLAGS_REMOVE_<basetarget>.o
> CPPFLAGS_<basetarget>
> HOSTCFLAGS_<basetarget>.o
> HOSTCXXFLAGS_<basetarget>.o
>
> The <basetarget> is the filename of the target without its suffix.
>
> This syntax comes into a trouble when two files with the same name
> appear in one Makefile, for example:
>
> obj-y += foo.o
> obj-y += dir/foo.o
> CFLAGS_foo.o := <some-flags>
>
> Here, the <some-flags> applies to both foo.o and dir/foo.o
>
> The real world problem is:
>
> scripts/kconfig/util.c
> scripts/kconfig/lxdialog/util.c
>
> Both files are compiled into scripts/kconfig/mconf, but only the
> latter should be given with additional flags for ncurses.
>
> It is more sensible to use the relative path to the Makefile, like this:
>
> obj-y += foo.o
> CFLAGS_foo.o := <some-flags>
> obj-y += dir/foo.o
> CFLAGS_dir/foo.o := <other-flags>
>
> The $* variable is replaced with the stem ('%') part in a pattern rule.
> In other words, this only works for pattern rules.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/arm/kvm/Makefile | 5 +++--
> arch/x86/entry/vdso/Makefile | 3 ++-
> scripts/Makefile.host | 30 +++++++++++++++---------------
> scripts/Makefile.lib | 10 +++++-----
> scripts/kconfig/Makefile | 8 ++++----
> 5 files changed, 29 insertions(+), 27 deletions(-)
For the KVM/arm part:
Acked-by: Marc Zyngier <maz@kernel.org>
Thanks,
M.
--
Jazz is not dead, it just smells funny.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-26 9:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-25 17:28 [PATCH 1/2] kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj) Masahiro Yamada
2019-08-25 17:28 ` Masahiro Yamada
2019-08-25 17:28 ` Masahiro Yamada
2019-08-25 17:28 ` [PATCH 2/2] kconfig: split util.c out of parser.y Masahiro Yamada
2019-08-26 9:17 ` Marc Zyngier [this message]
2019-08-26 9:17 ` [PATCH 1/2] kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj) Marc Zyngier
2019-08-26 9:17 ` Marc Zyngier
2019-08-27 0:29 ` kbuild test robot
2019-08-27 0:29 ` kbuild test robot
2019-08-27 0:29 ` kbuild test robot
2019-08-27 0:29 ` kbuild test robot
2019-08-27 1:36 ` kbuild test robot
2019-08-27 1:36 ` kbuild test robot
2019-08-27 1:36 ` kbuild test robot
2019-08-27 1:36 ` kbuild test robot
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=86sgpomgkd.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luto@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.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.