bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next] selftests/bpf : clean up feature/ when make clean
@ 2019-06-11  0:43 Hechao Li
  2019-06-11  8:54 ` Daniel Borkmann
  0 siblings, 1 reply; 2+ messages in thread
From: Hechao Li @ 2019-06-11  0:43 UTC (permalink / raw)
  To: bpf; +Cc: netdev, daniel, ast, kernel-team, Hechao Li

An error "implicit declaration of function 'reallocarray'" can be thrown
with the following steps:

$ cd tools/testing/selftests/bpf
$ make clean && make CC=<Path to GCC 4.8.5>
$ make clean && make CC=<Path to GCC 7.x>

The cause is that the feature folder generated by GCC 4.8.5 is not
removed, leaving feature-reallocarray being 1, which causes reallocarray
not defined when re-compliing with GCC 7.x. This diff adds feature
folder to EXTRA_CLEAN to avoid this problem.

v2: Rephrase the commit message.

Signed-off-by: Hechao Li <hechaol@fb.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/testing/selftests/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 2b426ae1cdc9..44fb61f4d502 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -279,4 +279,5 @@ $(OUTPUT)/verifier/tests.h: $(VERIFIER_TESTS_DIR) $(VERIFIER_TEST_FILES)
 		 ) > $(VERIFIER_TESTS_H))
 
 EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(ALU32_BUILD_DIR) \
-	$(VERIFIER_TESTS_H) $(PROG_TESTS_H) $(MAP_TESTS_H)
+	$(VERIFIER_TESTS_H) $(PROG_TESTS_H) $(MAP_TESTS_H) \
+	feature
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 bpf-next] selftests/bpf : clean up feature/ when make clean
  2019-06-11  0:43 [PATCH v2 bpf-next] selftests/bpf : clean up feature/ when make clean Hechao Li
@ 2019-06-11  8:54 ` Daniel Borkmann
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2019-06-11  8:54 UTC (permalink / raw)
  To: Hechao Li, bpf; +Cc: netdev, ast, kernel-team

On 06/11/2019 02:43 AM, Hechao Li wrote:
> An error "implicit declaration of function 'reallocarray'" can be thrown
> with the following steps:
> 
> $ cd tools/testing/selftests/bpf
> $ make clean && make CC=<Path to GCC 4.8.5>
> $ make clean && make CC=<Path to GCC 7.x>
> 
> The cause is that the feature folder generated by GCC 4.8.5 is not
> removed, leaving feature-reallocarray being 1, which causes reallocarray
> not defined when re-compliing with GCC 7.x. This diff adds feature
> folder to EXTRA_CLEAN to avoid this problem.
> 
> v2: Rephrase the commit message.
> 
> Signed-off-by: Hechao Li <hechaol@fb.com>
> Acked-by: Andrii Nakryiko <andriin@fb.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-11  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11  0:43 [PATCH v2 bpf-next] selftests/bpf : clean up feature/ when make clean Hechao Li
2019-06-11  8:54 ` Daniel Borkmann

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).