Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Lukas Bulwahn <lbulwahn@redhat.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	Nicolas Schier <nicolas.schier@linux.dev>,
	Dmitry Vyukov <dvyukov@google.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kbuild@vger.kernel.org, kasan-dev@googlegroups.com,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lukas Bulwahn <lukas.bulwahn@redhat.com>
Subject: Re: [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV
Date: Thu, 8 May 2025 17:44:25 +0100	[thread overview]
Message-ID: <20250508164425.GD834338@ax162> (raw)
In-Reply-To: <20250507133043.61905-1-lukas.bulwahn@redhat.com>

On Wed, May 07, 2025 at 03:30:43PM +0200, Lukas Bulwahn wrote:
> From: Lukas Bulwahn <lukas.bulwahn@redhat.com>
> 
> Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the
> config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the
> compiler option '-fsanitize-coverage=trace-pc' by now.
> 
> The commit however misses the important use of this config option in
> Makefile.kcov to add '-fsanitize-coverage=trace-pc' to CFLAGS_KCOV.
> Include the compiler option '-fsanitize-coverage=trace-pc' unconditionally
> to CFLAGS_KCOV, as all compilers provide that option now.
> 
> Fixes: 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin")
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>

Good catch.

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  scripts/Makefile.kcov | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/Makefile.kcov b/scripts/Makefile.kcov
> index 67de7942b3e7..01616472f43e 100644
> --- a/scripts/Makefile.kcov
> +++ b/scripts/Makefile.kcov
> @@ -1,5 +1,5 @@
>  # SPDX-License-Identifier: GPL-2.0-only
> -kcov-flags-$(CONFIG_CC_HAS_SANCOV_TRACE_PC)	+= -fsanitize-coverage=trace-pc
> +kcov-flags-y					+= -fsanitize-coverage=trace-pc
>  kcov-flags-$(CONFIG_KCOV_ENABLE_COMPARISONS)	+= -fsanitize-coverage=trace-cmp
>  
>  export CFLAGS_KCOV := $(kcov-flags-y)
> -- 
> 2.49.0
> 

  reply	other threads:[~2025-05-08 16:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 13:30 [PATCH] Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV Lukas Bulwahn
2025-05-08 16:44 ` Nathan Chancellor [this message]
2025-05-20 14:56   ` Dmitry Vyukov
2025-05-21 10:02     ` Alexander Potapenko
2025-05-21 14:10       ` Arnd Bergmann
2025-05-22  8:18         ` Alexander Potapenko

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=20250508164425.GD834338@ax162 \
    --to=nathan@kernel.org \
    --cc=andreyknvl@gmail.com \
    --cc=arnd@arndb.de \
    --cc=dvyukov@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lbulwahn@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@redhat.com \
    --cc=masahiroy@kernel.org \
    --cc=nicolas.schier@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox