lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86sgpomgkd.wl-maz@kernel.org>
Date:   Mon, 26 Aug 2019 10:17:22 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     linux-kbuild@...r.kernel.org, Andy Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
        James Morse <james.morse@....com>,
        Julien Thierry <julien.thierry.kdev@...il.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Russell King <linux@...linux.org.uk>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        kvmarm@...ts.cs.columbia.edu, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH 1/2] kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)

On Sun, 25 Aug 2019 18:28:32 +0100,
Masahiro Yamada <yamada.masahiro@...ionext.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@...ionext.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@...nel.org>

Thanks,

	M.

-- 
Jazz is not dead, it just smells funny.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ