perf bpf: Fix build breakage due to libbpf
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Mon, 11 Jan 2016 13:48:00 +0000 (13:48 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 11 Jan 2016 22:22:21 +0000 (19:22 -0300)
commitd5ef3140351450d240f864208317f5665e7bbd1c
tree6bd07922bd3cd1eeb9204423a2b8c1462b3edb82
parent935e6bd310f20d3371ae6bd6f01dd3430a4123b6
perf bpf: Fix build breakage due to libbpf

perf build is currently (v4.4-rc5) broken on powerpc:

  bpf.c:28:4: error: #error __NR_bpf not defined. libbpf does not support
  your arch.
   #  error __NR_bpf not defined. libbpf does not support your arch.
      ^

Fix this by including tools/scripts/Makefile.arch for the proper $ARCH
macro. While at it, remove redundant LP64 macro definition.

Also, since libbpf require $(srctree) now, detect the path of srctree
like perf.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1452520124-2073-10-git-send-email-wangnan0@huawei.com
[Use tools/scripts/Makefile.arch]
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/bpf/Makefile