Skip to content

selftests/lib.mk: LLVM=1, CC=clang, and warnings

John Hubbard linux-kselftest lkml llvm 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 12 repliesIn review
  2. v12 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2selftests/lib.mk: handle both LLVM=1 and CC=clang buildstools/testing/selftests/lib.mk+12 -09 replies
2/2selftests/lib.mk: silence some clang warnings that gcc already ignorestools/testing/selftests/lib.mk+8 -03 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMuhammad Usama AnjumNathan Chancellor
1/2R-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [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/[email protected]
[2] https://lore.kernel.org/[email protected]

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

Signature · 1 line
2.45.1