Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

samples/hid: remove unnecessary -I flags from libbpf EXTRA_CFLAGS

Commit 5a6ea7022ff4 ("samples/bpf: Remove unnecessary -I flags from
libbpf EXTRA_CFLAGS") fixed the build error caused by redundant include
path for samples/bpf, but not samples/hid.

Apply the same fix on samples/hid as well.

Fixes: 13b25489b6f8 ("kbuild: change working directory to external module directory with M=")
Tested-by: Ruowen Qin <ruqin@redhat.com>
Signed-off-by: Jinghao Jia <jinghao7@illinois.edu>
Link: https://patch.msgid.link/20250203085506.220297-2-jinghao7@illinois.edu
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>

authored by

Jinghao Jia and committed by
Benjamin Tissoires
1739cafd 9271af9d

+6 -5
+6 -5
samples/hid/Makefile
··· 40 40 endif 41 41 endif 42 42 43 - TPROGS_CFLAGS += -Wall -O2 44 - TPROGS_CFLAGS += -Wmissing-prototypes 45 - TPROGS_CFLAGS += -Wstrict-prototypes 43 + COMMON_CFLAGS += -Wall -O2 44 + COMMON_CFLAGS += -Wmissing-prototypes 45 + COMMON_CFLAGS += -Wstrict-prototypes 46 46 47 + TPROGS_CFLAGS += $(COMMON_CFLAGS) 47 48 TPROGS_CFLAGS += -I$(objtree)/usr/include 48 49 TPROGS_CFLAGS += -I$(LIBBPF_INCLUDE) 49 50 TPROGS_CFLAGS += -I$(srctree)/tools/include 50 51 51 52 ifdef SYSROOT 52 - TPROGS_CFLAGS += --sysroot=$(SYSROOT) 53 + COMMON_CFLAGS += --sysroot=$(SYSROOT) 53 54 TPROGS_LDFLAGS := -L$(SYSROOT)/usr/lib 54 55 endif 55 56 ··· 113 112 114 113 $(LIBBPF): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OUTPUT) 115 114 # Fix up variables inherited from Kbuild that tools/ build system won't like 116 - $(MAKE) -C $(LIBBPF_SRC) RM='rm -rf' EXTRA_CFLAGS="$(TPROGS_CFLAGS)" \ 115 + $(MAKE) -C $(LIBBPF_SRC) RM='rm -rf' EXTRA_CFLAGS="$(COMMON_CFLAGS)" \ 117 116 LDFLAGS=$(TPROGS_LDFLAGS) srctree=$(HID_SAMPLES_PATH)/../../ \ 118 117 O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix= \ 119 118 $@ install_headers