Skip to content

Commit

Permalink
mirror: Always disable unused CLI arguments warning for feature probe
Browse files Browse the repository at this point in the history
In commit 8a2d7d5 ("mirror: Fix features detection for building
with clang") we prevented clang to error out when encountering unused
command-line arguments in the feature probes, because we do add unused
arguments for some of the probes when retrieving arguments from
llvm-config, and we don't want probes to fail because of that.

At the time, the issue was apparent for the LLVM-based disassembler, so
we added -Wno-unused-command-line-argument when $(LLVM) was enabled,
only. We missed the case when we're building bpftool with clang instead
of gcc, without building the LLVM disassembler. Let's disable the
warning unconditionally instead to fix this case.

Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Quentin Monnet <qmo@kernel.org>
  • Loading branch information
qmonnet committed Oct 17, 2024
1 parent bf9e060 commit eb40a41
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Makefile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ pound := \#

CFLAGS_BACKUP := $(CFLAGS)
CFLAGS := $(EXTRA_CFLAGS)
ifneq ($(LLVM),)
CFLAGS += -Wno-unused-command-line-argument
endif
CFLAGS += -Wno-unused-command-line-argument

ifeq ($(V),1)
LOG=$(warning $(1))
Expand Down

0 comments on commit eb40a41

Please sign in to comment.