From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>,
Peter Oberparleiter <oberpar@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Mikhail Zaslonko <zaslonko@linux.ibm.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: [PATCH 1/2] kbuild: use $(CFLAGS_GCOV) in the prefer-atomic try-run test
Date: Thu, 01 Oct 2026 18:57:11 +0200 [thread overview]
Message-ID: <20261001-b4-prep-gcov-v1-1-794792e06f24@virtuozzo.com> (raw)
In-Reply-To: <20261001-b4-prep-gcov-v1-0-794792e06f24@virtuozzo.com>
Reference $(CFLAGS_GCOV) in the try-run test introduced by
commit 56cb9b7d96b2 ("gcov: use atomic counter updates to fix
concurrent access crashes"), otherwise it can miss potential future
changes in the list of flags used for GCOV profiling like it misses
-fno-tree-loop-im at the moment.
The outcome of the test is unchanged: -fno-tree-loop-im does not affect
the undefined symbols the test compares.
Suggested-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 6b8b812f23b92..3b69b973f7598 100644
--- a/Makefile
+++ b/Makefile
@@ -1184,11 +1184,11 @@ CFLAGS_GCOV += -fno-tree-loop-im
# undefined symbols (e.g. libatomic calls that the kernel cannot link).
CFLAGS_GCOV += $(call try-run,\
echo 'long long x; void f(void){x++;}' | \
- $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -w -fprofile-arcs \
- -ftest-coverage -x c - -c -o "$$TMP.base" && \
+ $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -w $(CFLAGS_GCOV) \
+ -x c - -c -o "$$TMP.base" && \
echo 'long long x; void f(void){x++;}' | \
- $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -w -fprofile-arcs \
- -ftest-coverage -fprofile-update=prefer-atomic \
+ $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -w $(CFLAGS_GCOV) \
+ -fprofile-update=prefer-atomic \
-x c - -c -o "$$TMP" && \
$(NM) "$$TMP.base" | grep ' U ' > "$$TMP.ubase" || true ; \
$(NM) "$$TMP" | grep ' U ' > "$$TMP.utest" || true ; \
--
2.43.0
next prev parent reply other threads:[~2026-10-01 16:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 16:57 [PATCH 0/2] kbuild: GCOV cleanups following the prefer-atomic fix Konstantin Khorenko
2026-10-01 16:57 ` Konstantin Khorenko [this message]
2026-10-01 16:57 ` [PATCH 2/2] kbuild: move GCOV flags to scripts/Makefile.gcov Konstantin Khorenko
2026-10-06 8:24 ` [PATCH 0/2] kbuild: GCOV cleanups following the prefer-atomic fix Peter Oberparleiter
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=20261001-b4-prep-gcov-v1-1-794792e06f24@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=oberpar@linux.ibm.com \
--cc=zaslonko@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®