Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752119AbbFKHbe (ORCPT ); Thu, 11 Jun 2015 03:31:34 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:32914 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbbFKHbZ (ORCPT ); Thu, 11 Jun 2015 03:31:25 -0400 Date: Thu, 11 Jun 2015 16:19:36 +0900 From: Namhyung Kim To: "Wangnan (F)" Cc: Alexei Starovoitov , acme@kernel.org, brendan.d.gregg@gmail.com, daniel@iogearbox.net, masami.hiramatsu.pt@hitachi.com, paulus@samba.org, a.p.zijlstra@chello.nl, mingo@redhat.com, jolsa@kernel.org, dsahern@gmail.com, linux-kernel@vger.kernel.org, lizefan@huawei.com, hekuang@huawei.com, xiakaixu@huawei.com, pi3orama@163.com Subject: Re: [RFC PATCH v6 24/32] perf record: Compile scriptlets if pass '.c' to --event Message-ID: <20150611071936.GA11184@sejong> References: <1433829036-23687-1-git-send-email-wangnan0@huawei.com> <1433829036-23687-25-git-send-email-wangnan0@huawei.com> <55775F3A.9080204@plumgrid.com> <55777F79.2080605@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <55777F79.2080605@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1234 Lines: 43 Hi Wang, On Wed, Jun 10, 2015 at 08:06:17AM +0800, Wangnan (F) wrote: > On 2015/6/10 5:48, Alexei Starovoitov wrote: > >Once clang integration is complete. One can pull > >upsteam llvm and clang and just use 'clang -O2 -c -march=bpf file.c' > > > > Good news, so llc part should be removed. > > Next version I'd like to use following config options: > > [llvm] > clang-bpf-cmd-template = "$CLANG_EXEC $CLANG_OPTIONS -c $CLANG_SOURCE > -emit-llvm -O2 -o - | /path/to/llc -march=bpf -filetype=obj -o -" > clang-path = "/path/to/clang" > clang-opt = "" > > And the default template should be: > > $CLANG_EXEC $CLANG_OPTIONS -c "$CLANG_SOURCE" -emit-llvm -O2 -o - Did you mean this? $CLANG_EXEC $CLANG_OPTIONS -O2 -c "$BPF_SOURCE" -march=bpf -o - Thanks, Namhyung > > Then with environment variable tricks we make it work with popen. > > By this way we can get rid of llc in perf side, and make it work even before > clang > integration is complete. > > 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/