[lkml]   [2019]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 4/4] perf augmented_raw_syscalls: Document clang configuration
On Thu, Jun 06, 2019 at 11:08:00AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 06, 2019 at 05:48:45PM +0800, Leo Yan escreveu:
> > To build this program successfully with clang, there have three
> > compiler options need to be specified:
> >
> > - Header file path: tools/perf/include/bpf;
> > - Specify architecture;
> > - Define macro __NR_CPUS__.
> So, this shouldn't be needed, all of this is supposed to be done
> automagically, have you done a 'make -C tools/perf install'?

I missed the up operation. But after git pulled the lastest code base
from perf/core branch and used the command 'make -C tools/perf
install', I still saw the eBPF build failure.

Just now this issue is fixed after I removed the config
'clang-bpf-cmd-template' from ~/.perfconfig; the reason is I followed
up the Documentation/perf-config.txt to set the config as below:

clang-bpf-cmd-template = "$CLANG_EXEC -D__KERNEL__ $CLANG_OPTIONS \
$KERNEL_INC_OPTIONS -Wno-unused-value \
-Wno-pointer-sign -working-directory \
$WORKING_DIR -c $CLANG_SOURCE -target bpf \
-O2 -o -"

In fact, util/llvm-utils.c has updated the default configuration as

"-Wno-unused-value -Wno-pointer-sign " \
"-working-directory $WORKING_DIR " \

Maybe should update Documentation/perf-config.txt to tell users the
real default value of clang-bpf-cmd-template?

Leo Yan

 \ /
  Last update: 2019-06-06 16:37    [W:0.072 / U:3.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site