Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754798AbbFMDDY (ORCPT ); Fri, 12 Jun 2015 23:03:24 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33584 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751433AbbFMDDV (ORCPT ); Fri, 12 Jun 2015 23:03:21 -0400 Message-ID: <557B9D76.8060505@plumgrid.com> Date: Fri, 12 Jun 2015 20:03:18 -0700 From: Alexei Starovoitov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: pi3orama CC: Wang Nan , "acme@kernel.org" , "brendan.d.gregg@gmail.com" , "daniel@iogearbox.net" , "namhyung@kernel.org" , "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" Subject: Re: [RFC PATCH v7 23/37] perf tools: Introduce llvm config options References: <1434087345-127225-1-git-send-email-wangnan0@huawei.com> <1434087345-127225-24-git-send-email-wangnan0@huawei.com> <557B960B.60504@plumgrid.com> <195F4F7A-2206-40D5-BD45-BACD61E81C8F@163.com> In-Reply-To: <195F4F7A-2206-40D5-BD45-BACD61E81C8F@163.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1356 Lines: 30 On 6/12/15 7:52 PM, pi3orama wrote: > > > ?????ҵ? iPhone > >> ?? 2015??6??13?գ?????10:31??Alexei Starovoitov д???? >> >>> On 6/11/15 10:35 PM, Wang Nan wrote: >>> # Path to clang. If omit, search it from $PATH. >>> clang-path = "/path/to/clang" >> >> I think this bit and search_program() from the next patch is >> overly flexible. It's always delicate to search file paths. >> Unless this is really needed, I would drop this bit. > > I think searching clang before execution is still equired. If not, we are unable to know the exact reason why the shell script failed. If there's no clang at all, we can simply return an error instead of trying to detect kbuild and kernel header. Which is slower than clang compiling itself. > > What about creating another shell script simply run 'clang --version' to check availability of clang? Then search_program can be dropped. Hmm, I'm missing something. If clang is not in a path, the string from popen will be something like: /bin/sh: clang: command not found ? but if you want to call 'clang --version' as well that's also fine. -- 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/