diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-05-04 10:37:27 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-05-15 14:31:17 -0300 |
commit | 1b16fffa389dcd4cc054f49e77a4e2ac61e8f287 (patch) | |
tree | afd1b77faeab302b896c8619ba239b889b1e0aec /tools/perf/util/Build | |
parent | d8ed87bc171946313b2e6d26e1fec494da9154bc (diff) | |
download | op-kernel-dev-1b16fffa389dcd4cc054f49e77a4e2ac61e8f287.zip op-kernel-dev-1b16fffa389dcd4cc054f49e77a4e2ac61e8f287.tar.gz |
perf llvm-utils: Add bpf include path to clang command line
We'll start putting headers for helpers to be used in eBPF proggies in
there:
# perf trace -v --no-syscalls -e empty.c |& grep "llvm compiling command : "
llvm compiling command : /usr/lib64/ccache/clang -D__KERNEL__ -D__NR_CPUS__=4 -DLINUX_VERSION_CODE=0x41100 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/7/include -I/home/acme/git/linux/arch/x86/include -I./arch/x86/include/generated -I/home/acme/git/linux/include -I./include -I/home/acme/git/linux/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/home/acme/git/linux/include/uapi -I./include/generated/uapi -include /home/acme/git/linux/include/linux/kconfig.h -I/home/acme/lib/include/perf/bpf -Wno-unused-value -Wno-pointer-sign -working-directory /lib/modules/4.17.0-rc3-00034-gf4ef6a438cee/build -c /home/acme/bpf/empty.c -target bpf -O2 -o -
#
Notice the "-I/home/acme/lib/include/perf/bpf"
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-6xq94xro8xlb5s9urznh3f9k@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/Build')
-rw-r--r-- | tools/perf/util/Build | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 8052373..5d4c45b 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -152,6 +152,8 @@ libperf-y += perf-hooks.o libperf-$(CONFIG_CXX) += c++/ CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" +CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))" + # avoid compiler warnings in 32-bit mode CFLAGS_genelf_debug.o += -Wno-packed |