Skip to content

Commit eda80aa

Browse files
committed
Merge branch 'bpf-avoid-attribute-ignored-warnings-in-gcc'
Jose E. Marchesi says: ==================== bpf: avoid `attribute ignored' warnings in GCC These two patches avoid warnings (turned into errors) when building the BPF selftests with GCC. [Changes from V1: - As requested by reviewer, an additional patch has been added in order to remove __hidden from the `private' macro in cpumask_common.h. - Typo bening -> benign fixed in the commit message of the second patch.] ==================== Link: https://lore.kernel.org/r/20240507074227.4523-1-jose.marchesi@oracle.com Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
2 parents 75b0fbf + b0fbdf7 commit eda80aa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tools/testing/selftests/bpf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ endef
431431
# Build BPF object using GCC
432432
define GCC_BPF_BUILD_RULE
433433
$(call msg,GCC-BPF,$(TRUNNER_BINARY),$2)
434-
$(Q)$(BPF_GCC) $3 -O2 -c $1 -o $2
434+
$(Q)$(BPF_GCC) $3 -Wno-attributes -O2 -c $1 -o $2
435435
endef
436436

437437
SKEL_BLACKLIST := btf__% test_pinning_invalid.c test_sk_assign.c

tools/testing/selftests/bpf/progs/cpumask_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
int err;
1111

12-
#define private(name) SEC(".bss." #name) __hidden __attribute__((aligned(8)))
12+
#define private(name) SEC(".bss." #name) __attribute__((aligned(8)))
1313
private(MASK) static struct bpf_cpumask __kptr * global_mask;
1414

1515
struct __cpumask_map_value {

0 commit comments

Comments
 (0)