Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755152AbbERT73 (ORCPT ); Mon, 18 May 2015 15:59:29 -0400 Received: from mail-ig0-f181.google.com ([209.85.213.181]:37270 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754243AbbERT7Z (ORCPT ); Mon, 18 May 2015 15:59:25 -0400 Message-ID: <555A449B.9010602@plumgrid.com> Date: Mon, 18 May 2015 12:59:23 -0700 From: Alexei Starovoitov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: He Kuang , paulus@samba.org, a.p.zijlstra@chello.nl, mingo@redhat.com, acme@kernel.org, namhyung@kernel.org, jolsa@kernel.org, dsahern@gmail.com, daniel@iogearbox.net, brendan.d.gregg@gmail.com, masami.hiramatsu.pt@hitachi.com CC: wangnan0@huawei.com, lizefan@huawei.com, linux-kernel@vger.kernel.org, pi3orama@163.com Subject: Re: [RFC PATCH 4/5] samples/bpf: Add proper prefix to objects in Makefile References: <1431927047-35144-1-git-send-email-hekuang@huawei.com> <1431927047-35144-5-git-send-email-hekuang@huawei.com> In-Reply-To: <1431927047-35144-5-git-send-email-hekuang@huawei.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1247 Lines: 31 On 5/17/15 10:30 PM, He Kuang wrote: > Always use $(obj) when referring to generated files and use $(src) when > referring to files located in the src tree. > > Signed-off-by: He Kuang > --- > samples/bpf/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile > index 76e3458..8fdbd73 100644 > --- a/samples/bpf/Makefile > +++ b/samples/bpf/Makefile > @@ -44,7 +44,7 @@ HOSTLOADLIBES_tracex4 += -lelf -lrt > # point this to your LLVM backend with bpf support > LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc > > -%.o: %.c > +$(obj)/%.o: $(src)/%.c > clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ > -D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \ > -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@ the same fix is already in net-next: https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=b88c06e36dcb9b4ae285f7821f62d68dc34b25d3 -- 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/