aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/bpf/test_libbpf.cpp
diff options
context:
space:
mode:
authorIvan Khoronzhuk <[email protected]>2019-10-11 03:28:04 +0300
committerAlexei Starovoitov <[email protected]>2019-10-12 16:08:59 -0700
commit5c26f9a783581058c5de93627ae64139c4b32ceb (patch)
treead28a8f0cc178c186cc9375381f540334a59c749 /tools/lib/bpf/test_libbpf.cpp
parenta833effa15903d07946645fc5e76b3b18a591409 (diff)
libbpf: Don't use cxx to test_libpf target
No need to use C++ for test_libbpf target when libbpf is on C and it can be tested with C, after this change the CXXFLAGS in makefiles can be avoided, at least in bpf samples, when sysroot is used, passing same C/LDFLAGS as for lib. Add "return 0" in test_libbpf to avoid warn, but also remove spaces at start of the lines to keep same style and avoid warns while apply. Signed-off-by: Ivan Khoronzhuk <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/test_libbpf.cpp')
-rw-r--r--tools/lib/bpf/test_libbpf.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/tools/lib/bpf/test_libbpf.cpp b/tools/lib/bpf/test_libbpf.cpp
deleted file mode 100644
index fc134873bb6d..000000000000
--- a/tools/lib/bpf/test_libbpf.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
-#include "libbpf.h"
-#include "bpf.h"
-#include "btf.h"
-
-/* do nothing, just make sure we can link successfully */
-
-int main(int argc, char *argv[])
-{
- /* libbpf.h */
- libbpf_set_print(NULL);
-
- /* bpf.h */
- bpf_prog_get_fd_by_id(0);
-
- /* btf.h */
- btf__new(NULL, 0);
-}