* [PATCH bpf-next] bpf: move -Wno-compare-distinct-pointer-types to BPF_CFLAGS
@ 2024-01-30 11:36 Jose E. Marchesi
2024-01-30 15:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jose E. Marchesi @ 2024-01-30 11:36 UTC (permalink / raw)
To: bpf
Cc: Jose E . Marchesi, Yonghong Song, Eduard Zingerman, David Faust,
Cupertino Miranda
Clang supports enabling/disabling certain conversion diagnostics via
the -W[no-]compare-distinct-pointer-types command line options.
Disabling this warning is required by some BPF selftests due to
-Werror. Until very recently GCC would emit these warnings
unconditionally, which was a problem for gcc-bpf, but we added support
for the command-line options to GCC upstream [1].
This patch moves the -Wno-cmopare-distinct-pointer-types from
CLANG_CFLAGS to BPF_CFLAGS in selftests/bpf/Makefile so the option is
also used in gcc-bpf builds, not just in clang builds.
Tested in bpf-next master.
No regressions.
[1] https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627769.html
Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
Cc: Yonghong Song <yhs@meta.com>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: David Faust <david.faust@oracle.com>
Cc: Cupertino Miranda <cupertino.miranda@oracle.com>
---
tools/testing/selftests/bpf/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 1a3654bcb5dd..f9f7d24e6d77 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -391,11 +391,11 @@ endif
CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH))
BPF_CFLAGS = -g -Wall -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \
-I$(INCLUDE_DIR) -I$(CURDIR) -I$(APIDIR) \
- -I$(abspath $(OUTPUT)/../usr/include)
+ -I$(abspath $(OUTPUT)/../usr/include) \
+ -Wno-compare-distinct-pointer-types
# TODO: enable me -Wsign-compare
-CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \
- -Wno-compare-distinct-pointer-types
+CLANG_CFLAGS = $(CLANG_SYS_INCLUDES)
$(OUTPUT)/test_l4lb_noinline.o: BPF_CFLAGS += -fno-inline
$(OUTPUT)/test_xdp_noinline.o: BPF_CFLAGS += -fno-inline
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] bpf: move -Wno-compare-distinct-pointer-types to BPF_CFLAGS
2024-01-30 11:36 [PATCH bpf-next] bpf: move -Wno-compare-distinct-pointer-types to BPF_CFLAGS Jose E. Marchesi
@ 2024-01-30 15:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-30 15:20 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: bpf, yhs, eddyz87, david.faust, cupertino.miranda
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Tue, 30 Jan 2024 12:36:24 +0100 you wrote:
> Clang supports enabling/disabling certain conversion diagnostics via
> the -W[no-]compare-distinct-pointer-types command line options.
> Disabling this warning is required by some BPF selftests due to
> -Werror. Until very recently GCC would emit these warnings
> unconditionally, which was a problem for gcc-bpf, but we added support
> for the command-line options to GCC upstream [1].
>
> [...]
Here is the summary with links:
- [bpf-next] bpf: move -Wno-compare-distinct-pointer-types to BPF_CFLAGS
https://git.kernel.org/bpf/bpf-next/c/24219056805f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-30 15:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 11:36 [PATCH bpf-next] bpf: move -Wno-compare-distinct-pointer-types to BPF_CFLAGS Jose E. Marchesi
2024-01-30 15:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).