From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757951AbcH3QVp (ORCPT ); Tue, 30 Aug 2016 12:21:45 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:49621 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756035AbcH3QVn (ORCPT ); Tue, 30 Aug 2016 12:21:43 -0400 Subject: Re: [PATCH] perf tools: Fix static building To: Alexey Brodkin , "linux-kernel@vger.kernel.org" References: <1471887222-26270-1-git-send-email-abrodkin@synopsys.com> CC: "linux-snps-arc@lists.infradead.org" , Arnaldo Carvalho de Melo , Wang Nan , Jiri Olsa , He Kuang , Masami Hiramatsu , Namhyung Kim , Peter Zijlstra , Zefan Li , "pi3orama@163.com" From: Vineet Gupta Message-ID: Date: Tue, 30 Aug 2016 09:21:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1471887222-26270-1-git-send-email-abrodkin@synopsys.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.9.129.126] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/22/2016 10:35 AM, Alexey Brodkin wrote: > With commit e3d09ec8126f ("tools lib traceevent: Export dynamic symbols > used by traceevent plugins") we started to add "--dynamic-list" in > LDFLAGS. One side-effect of that was inability to build really > statically-linked perf. > > I.e. even if "LDFLAGS=-static" were passed on perf building command-line > it had no effect and perf was built dynamically. > > This change disables setup of "--dynamic-list" if LDFLAGS contains > "-static" option. > > Signed-off-by: Alexey Brodkin > Cc: Arnaldo Carvalho de Melo > Cc: Vineet Gupta > Cc: Wang Nan > Cc: Jiri Olsa > Cc: He Kuang > Cc: Masami Hiramatsu > Cc: Namhyung Kim > Cc: Peter Zijlstra > Cc: Zefan Li > Cc: pi3orama@163.com > --- > tools/perf/Makefile.perf | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > index 2d908750..e9acc7c 100644 > --- a/tools/perf/Makefile.perf > +++ b/tools/perf/Makefile.perf > @@ -236,7 +236,9 @@ LIBTRACEEVENT = $(TE_PATH)libtraceevent.a > export LIBTRACEEVENT > > LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list > +ifeq ($(filter -static,$(LDFLAGS)),) > LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST) > +endif > > LIBAPI = $(API_PATH)libapi.a > export LIBAPI Gentle Ping while Alexey is away on vacation ! Arnaldo are you ok with this patch. Thx, -Vineet