From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964990AbcALJ3F (ORCPT ); Tue, 12 Jan 2016 04:29:05 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:28092 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964934AbcALJ2x (ORCPT ); Tue, 12 Jan 2016 04:28:53 -0500 Message-ID: <5694C73C.3070007@huawei.com> Date: Tue, 12 Jan 2016 17:28:28 +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: Jiri Olsa , Arnaldo Carvalho de Melo CC: lkml , David Ahern , "Ingo Molnar" , Namhyung Kim , Peter Zijlstra Subject: Re: [RFC 6/6] perf build: Introduce FEATURES_DUMP make variable References: <1452509693-13452-1-git-send-email-jolsa@kernel.org> <1452509693-13452-7-git-send-email-jolsa@kernel.org> In-Reply-To: <1452509693-13452-7-git-send-email-jolsa@kernel.org> 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.5694C74B.00AF,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: 52c79e33011bb9305966993c5404229a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/1/11 18:54, Jiri Olsa wrote: > Introducing FEATURES_DUMP make variable to provide features > detection dump file and bypass the feature detection. > > The intention is to use this during build tests to skip > repeated features detection, like: > > Get feature dump static build into /tmp/fd file: > $ make feature-dump FEATURE_DUMP_COPY=/tmp/fd LDFLAGS=-static > BUILD: Doing 'make -j4' parallel build > > Auto-detecting system features: > ... dwarf: [ OFF ] > > SNIP > > FEATURE-DUMP file copied into /tmp/fd > > Use /tmp/fd to build perf: > $ make FEATURES_DUMP=/tmp/fd LDFLAGS=-static > > $ file perf > perf: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for ... > > Suggested-by: Wang Nan > Link: http://lkml.kernel.org/n/tip-fhb47m6t18txuwrzu33is2bo@git.kernel.org > Signed-off-by: Jiri Olsa > --- Thank you for these two patch. However I found a small limitation. I must skip 'make clean' between two feature-dump, or the result is wrong. For example: $ make feature-dump LDFLAGS="-static" BUILD: Doing 'make -j24' parallel build Auto-detecting system features: ... zlib: [ on ] ... lzma: [ OFF ] <--- looks good. I don't have static lzma library ... get_cpuid: [ on ] ... bpf: [ on ] $ make feature-dump BUILD: Doing 'make -j24' parallel build Auto-detecting system features: ... zlib: [ on ] ... lzma: [ on ] <--- also good ... get_cpuid: [ on ] ... bpf: [ on ] $ make feature-dump LDFLAGS="-static" BUILD: Doing 'make -j24' parallel build Auto-detecting system features: ... zlib: [ on ] ... lzma: [ on ] <--- Bad... ... get_cpuid: [ on ] ... bpf: [ on ] Thank you.