mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 23:23:03 +00:00
df90cc41d6
When cross compiling perf and I want to link against a self-compiled libunwind, I usually make the custom path where the libunwind headers exist visible by adding the libunwind prefix to the include path when compiling perf, i.e.: ~~~~~ $ ls $HOME/projects/compiled/other/include/ libunwind-coredump.h libunwind.h libunwind-x86_64.h libunwind-common.h libunwind-dynamic.h libunwind-ptrace.h unwind.h $ make EXTRA_CFLAGS="-I$HOME/projects/compiled/other/include/ ~~~~~~ Note the `unwind.h` header from libunwind which leads to compile errors when compiling tests/dwarf-unwind.c, since it shadows perf's util/unwind.h: ~~~~~ tests/dwarf-unwind.c:41:32: error: ‘struct unwind_entry’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror] static int unwind_entry(struct unwind_entry *entry, void *arg) ^~~~~~~~~~~~ tests/dwarf-unwind.c: In function ‘unwind_entry’: tests/dwarf-unwind.c:44:22: error: dereferencing pointer to incomplete type ‘struct unwind_entry’ char *symbol = entry->sym ? entry->sym->name : NULL; ^~ tests/dwarf-unwind.c: In function ‘unwind_thread’: tests/dwarf-unwind.c:92:8: error: implicit declaration of function ‘unwind__get_entries’; did you mean ‘unwind_entry’? [-Werror=implicit-function-declaration] err = unwind__get_entries(unwind_entry, &cnt, thread, ^~~~~~~~~~~~~~~~~~~ unwind_entry tests/dwarf-unwind.c:92:8: error: nested extern declaration of ‘unwind__get_entries’ [-Werror=nested-externs] ~~~~~~ Fix this compile error by specificing an explicit include of perf's unwind.h in the util folder. Signed-off-by: Milian Wolff <milian.wolff@kdab.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Yao Jin <yao.jin@linux.intel.com> Link: http://lkml.kernel.org/r/20170906150209.12579-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
||
---|---|---|
.. | ||
attr | ||
shell | ||
.gitignore | ||
attr.c | ||
attr.py | ||
backward-ring-buffer.c | ||
bitmap.c | ||
bp_signal_overflow.c | ||
bp_signal.c | ||
bpf-script-example.c | ||
bpf-script-test-kbuild.c | ||
bpf-script-test-prologue.c | ||
bpf-script-test-relocation.c | ||
bpf.c | ||
Build | ||
builtin-test.c | ||
clang.c | ||
code-reading.c | ||
cpumap.c | ||
dso-data.c | ||
dwarf-unwind.c | ||
event_update.c | ||
event-times.c | ||
evsel-roundtrip-name.c | ||
evsel-tp-sched.c | ||
expr.c | ||
fdarray.c | ||
hists_common.c | ||
hists_common.h | ||
hists_cumulate.c | ||
hists_filter.c | ||
hists_link.c | ||
hists_output.c | ||
is_printable_array.c | ||
keep-tracking.c | ||
kmod-path.c | ||
llvm.c | ||
llvm.h | ||
make | ||
mem.c | ||
mmap-basic.c | ||
mmap-thread-lookup.c | ||
openat-syscall-all-cpus.c | ||
openat-syscall-tp-fields.c | ||
openat-syscall.c | ||
parse-events.c | ||
parse-no-sample-id-all.c | ||
perf-hooks.c | ||
perf-record.c | ||
perf-targz-src-pkg | ||
pmu.c | ||
python-use.c | ||
sample-parsing.c | ||
sdt.c | ||
stat.c | ||
sw-clock.c | ||
switch-tracking.c | ||
task-exit.c | ||
tests.h | ||
thread-map.c | ||
thread-mg-share.c | ||
topology.c | ||
unit_number__scnprintf.c | ||
vmlinux-kallsyms.c |