Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755591AbbFMDqJ (ORCPT ); Fri, 12 Jun 2015 23:46:09 -0400 Received: from m12-14.163.com ([220.181.12.14]:36312 "EHLO m12-14.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755565AbbFMDqB convert rfc822-to-8bit (ORCPT ); Fri, 12 Jun 2015 23:46:01 -0400 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH v7 23/37] perf tools: Introduce llvm config options From: pi3orama X-Mailer: iPhone Mail (12F70) In-Reply-To: <557B9D76.8060505@plumgrid.com> Date: Sat, 13 Jun 2015 11:31:31 +0800 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" Content-Transfer-Encoding: 8BIT Message-Id: 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> <557B9D76.8060505@plumgrid.com> To: Alexei Starovoitov X-CM-TRANSID: DsCowEDp_00SpHtVfBj1CA--.33864S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7ur1xCF1UXFy8GF1xXw4xWFg_yoW8Wr4UpF WUKas8KF4vyryYyr1qqw1fu34Fqr18Cr1ruryFgrWF93s0gFyfKr97Kw43uF47Cr4vkayj vrZ09F9aq3y8AaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jzyxiUUUUU= X-Originating-IP: [117.136.38.86] X-CM-SenderInfo: lslt02xdpdqiywtou0bp/1tbiNA8YQFC-HnhbAQAAsw Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1852 Lines: 40 ?????ҵ? iPhone > ?? 2015??6??13?գ?????11:03??Alexei Starovoitov д???? > >> 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 > ? Yes, user will get this error message from sh, but: 1. After kbuild and kernel include detection (which is expensive, takes even longer time than compiling), 2. Perf can't find the exact reason of the problem (error message is printed to sdterr, popen can only get an empty string and a !0 error code, which is similar to the result of compiling error). > 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/