lkml.org 
[lkml]   [2019]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.0 050/346] tools/bpf: fix perf build error with uClibc (seen on ARC)
    Date
    [ Upstream commit ca31ca8247e2d3807ff5fa1d1760616a2292001c ]

    When build perf for ARC recently, there was a build failure due to lack
    of __NR_bpf.

    | Auto-detecting system features:
    |
    | ... get_cpuid: [ OFF ]
    | ... bpf: [ on ]
    |
    | # error __NR_bpf not defined. libbpf does not support your arch.
    ^~~~~
    | bpf.c: In function 'sys_bpf':
    | bpf.c:66:17: error: '__NR_bpf' undeclared (first use in this function)
    | return syscall(__NR_bpf, cmd, attr, size);
    | ^~~~~~~~
    | sys_bpf

    Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
    Acked-by: Yonghong Song <yhs@fb.com>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    tools/lib/bpf/bpf.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
    index 88cbd110ae580..ddeb46c9eef2f 100644
    --- a/tools/lib/bpf/bpf.c
    +++ b/tools/lib/bpf/bpf.c
    @@ -45,6 +45,8 @@
    # define __NR_bpf 349
    # elif defined(__s390__)
    # define __NR_bpf 351
    +# elif defined(__arc__)
    +# define __NR_bpf 280
    # else
    # error __NR_bpf not defined. libbpf does not support your arch.
    # endif
    --
    2.20.1



    \
     
     \ /
      Last update: 2019-05-30 06:14    [W:4.117 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site