From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756606AbcANRcd (ORCPT ); Thu, 14 Jan 2016 12:32:33 -0500 Received: from mail.kernel.org ([198.145.29.136]:44750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755515AbcANRc1 (ORCPT ); Thu, 14 Jan 2016 12:32:27 -0500 Date: Thu, 14 Jan 2016 14:32:22 -0300 From: Arnaldo Carvalho de Melo To: pi3orama Cc: Wang Nan , jolsa@redhat.com, linux-kernel@vger.kernel.org, lizefan@huawei.com, Jiri Olsa , Namhyung Kim Subject: Re: [PATCH v2 3/9] perf build: Test correct path of perf in build-test Message-ID: <20160114173222.GX18367@kernel.org> References: <1452777243-178927-1-git-send-email-wangnan0@huawei.com> <1452777243-178927-4-git-send-email-wangnan0@huawei.com> <20160114145021.GT18367@kernel.org> <20160114145817.GU18367@kernel.org> <55C8AD45-4C6F-454E-A0E9-4BCF769EE74E@163.com> <20160114154436.GV18367@kernel.org> <20160114160202.GW18367@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160114160202.GW18367@kernel.org> X-Url: http://acmel.wordpress.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 Em Thu, Jan 14, 2016 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Jan 14, 2016 at 12:44:36PM -0300, Arnaldo Carvalho de Melo escreveu: > > If I try it manually, in the source tree: > > > > [acme@felicio linux]$ cd tools/perf > > [acme@felicio perf]$ make LDFLAGS=-static > > BUILD: Doing 'make -j4' parallel build > > GEN libtraceevent-dynamic-list > > LINK libperf-gtk.so > > /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginT.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC > > /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginT.o: could not read symbols: Bad value > > collect2: error: ld returned 1 exit status > > make[1]: *** [libperf-gtk.so] Error 1 > > make: *** [all] Error 2 > > [acme@felicio perf]$ > > > > And if I do a make clean and try again, it works: > > [acme@felicio linux]$ git log --oneline -5 > be874d2f8baa perf build: Test correct path of perf in build-test > dab97c905927 perf build: Pass O option to Makefile.perf in build-test > 7d66631ea112 perf build: Set parallel making options build-test > 69d5f8e92f05 perf symbols: Fix reading of build-id from vDSO > 8bf78e69a277 perf kvm record/report: 'unprocessable sample' error while > recording/reporting guest data > [acme@felicio linux]$ > > So, with that hunch, I tried with the patch below and it finishes a > 'make -C tools/perf build-test' run with no find .cmd errors not > 'make_static' failures, investigating what is the problem with the > 'clean' target when it gets a O= passed... So, this seems to do the trick, is it right? diff --git a/tools/perf/tests/make b/tools/perf/tests/make index e74c86b00c31..29810cf2c117 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -266,7 +266,7 @@ endif MAKEFLAGS := --no-print-directory -clean := @(cd $(PERF); make -s -f $(MK) O=$(PERF_O) clean >/dev/null) +clean := @(cd $(PERF); make -s -f $(MK) $(O_OPT) clean >/dev/null) $(run): $(call clean) > [acme@felicio linux]$ git diff > diff --git a/tools/perf/tests/make b/tools/perf/tests/make > index e74c86b00c31..baf8f0099507 100644 > --- a/tools/perf/tests/make > +++ b/tools/perf/tests/make > @@ -266,7 +266,8 @@ endif > > MAKEFLAGS := --no-print-directory > > -clean := @(cd $(PERF); make -s -f $(MK) O=$(PERF_O) clean >/dev/null) > +#clean := @(cd $(PERF); make -s -f $(MK) O=$(PERF_O) clean >/dev/null) > +clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null) > > $(run): > $(call clean) > [acme@felicio linux]$ >