Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933258AbbLOIvy (ORCPT ); Tue, 15 Dec 2015 03:51:54 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:29772 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932389AbbLOIvw (ORCPT ); Tue, 15 Dec 2015 03:51:52 -0500 Message-ID: <566FD41D.2040609@huawei.com> Date: Tue, 15 Dec 2015 16:49:33 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: , , CC: , , "Sukadev Bhattiprolu" Subject: Re: [PATCH v3 3/3] perf: bpf: Fix build breakage due to libbpf References: <1450090232-11437-1-git-send-email-naveen.n.rao@linux.vnet.ibm.com> <1450150557-127942-1-git-send-email-wangnan0@huawei.com> <1450150557-127942-4-git-send-email-wangnan0@huawei.com> In-Reply-To: <1450150557-127942-4-git-send-email-wangnan0@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.566FD428.007A,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 08b8011d450d3697c2f32d70350ecc5d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1652 Lines: 48 This patch contains a problem. On 2015/12/15 11:35, Wang Nan wrote: > From: "Naveen N. Rao" > > 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/perf/config/Makefile.arch for the proper > $ARCH macro. While at it, remove redundant LP64 macro definition. > > Signed-off-by: Naveen N. Rao > Signed-off-by: Wang Nan > Cc: Arnaldo Carvalho de Melo > Cc: Jiri Olsa > Cc: Sukadev Bhattiprolu > --- > tools/lib/bpf/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile > index 636e3dd..3d34a8c 100644 > --- a/tools/lib/bpf/Makefile > +++ b/tools/lib/bpf/Makefile > @@ -31,7 +31,8 @@ INSTALL = install > DESTDIR ?= > DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))' > > -LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1) > +include $(srctree)/tools/scripts/Makefile.arch > + Here we depend on $(srctree), but libbpf's Makefile doesn't automatically detect it. Directly 'make' in libbpf directory causes an error. Will post a v4 for it. Thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/