[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240531183751.100541-1-jhubbard@nvidia.com>
Date: Fri, 31 May 2024 11:37:49 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Shuah Khan <shuah@...nel.org>,
Muhammad Usama Anjum <usama.anjum@...labora.com>
Cc: Beau Belgrave <beaub@...ux.microsoft.com>,
Steven Rostedt <rostedt@...dmis.org>,
Mark Brown <broonie@...nel.org>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
Bill Wendling <morbo@...gle.com>,
sunliming <sunliming@...inos.cn>,
Masami Hiramatsu <mhiramat@...nel.org>,
Valentin Obst <kernel@...entinobst.de>,
linux-kselftest@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
llvm@...ts.linux.dev,
John Hubbard <jhubbard@...dia.com>
Subject: [PATCH v2 0/2] selftests/lib.mk: LLVM=1, CC=clang, and warnings
The kselftests may be built in a couple different ways:
make LLVM=1
make CC=clang
In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest
of lib.mk, and any Makefiles that include lib.mk, can base decisions
solely on whether or not LLVM is set.
Then, build upon that to disable a pair of clang warnings that are
already silenced on gcc.
Doing it this way is much better than the piecemeal approach that I
started with in [1] and [2]. Thanks to Nathan Chancellor for the patch
reviews that led to this approach.
Changes since the first version:
1) Wrote a detailed explanation for suppressing two clang warnings, in
both a lib.mk comment, and the commit description.
2) Added a Reviewed-by tag to the first patch.
[1] https://lore.kernel.org/20240527214704.300444-1-jhubbard@nvidia.com
[2] https://lore.kernel.org/20240527213641.299458-1-jhubbard@nvidia.com
John Hubbard (2):
selftests/lib.mk: handle both LLVM=1 and CC=clang builds
selftests/lib.mk: silence some clang warnings that gcc already ignores
tools/testing/selftests/lib.mk | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
base-commit: e0cce98fe279b64f4a7d81b7f5c3a23d80b92fbc
--
2.45.1
Powered by blists - more mailing lists