From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hendrik Brueckner Subject: Re: [PATCH 18/36] perf s390: Always build with -fPIC Date: Thu, 7 Dec 2017 09:09:51 +0100 Message-ID: <20171207080951.GC4889@linux.vnet.ibm.com> References: <20171206144115.15097-1-acme@kernel.org> <20171206144115.15097-19-acme@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50540 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752312AbdLGIJ6 (ORCPT ); Thu, 7 Dec 2017 03:09:58 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vB7899UA073519 for ; Thu, 7 Dec 2017 03:09:58 -0500 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2eq1nbrpb6-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 07 Dec 2017 03:09:57 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Dec 2017 08:09:56 -0000 Content-Disposition: inline In-Reply-To: <20171206144115.15097-19-acme@kernel.org> Sender: linux-perf-users-owner@vger.kernel.org List-ID: To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Hendrik Brueckner , Heiko Carstens , Martin Schwidefsky , Thomas Richter , linux s390 list , Arnaldo Carvalho de Melo Hi Arnaldo, On Wed, Dec 06, 2017 at 11:40:57AM -0300, Arnaldo Carvalho de Melo wrote: > From: Hendrik Brueckner > > On s390, object files must be compiled with position-indepedent code in > order to be incrementally linked or linked to shared libraries. > Therefore, add -fPIC to the CFLAGS for s390 to ensure each object file > is built properly. > > Reported-by: Jonathan Hermann > Signed-off-by: Hendrik Brueckner > Cc: Heiko Carstens > Cc: Martin Schwidefsky > Cc: Thomas Richter > Cc: linux s390 list > LPU-Reference: 1512031765-9382-1-git-send-email-brueckner@linux.vnet.ibm.com > Link: https://lkml.kernel.org/n/tip-a8wga8hrl0d0r84cal96fmgv@git.kernel.org > Signed-off-by: Arnaldo Carvalho de Melo > --- > tools/perf/Makefile.config | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > index 2c437baf8364..bf86c09ca889 100644 > --- a/tools/perf/Makefile.config > +++ b/tools/perf/Makefile.config > @@ -41,6 +41,7 @@ ifeq ($(SRCARCH),x86) > LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind > endif > NO_PERF_REGS := 0 > + CFLAGS += -fPIC > endif I was just rebasing my syscall table work on top of your perf/core tree. It looks like that there is a significant difference compared to linux master tree. With f704ef44602fbf403e6722c7ed13f62d17e8cb20 ("s390/perf: add support for perf_regs and libdw"), Heiko introduced a change in the Makefile.config: --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -53,6 +53,10 @@ ifeq ($(SRCARCH),arm64) LIBUNWIND_LIBS = -lunwind -lunwind-aarch64 endif +ifeq ($(ARCH),s390) + NO_PERF_REGS := 0 +endif + ifeq ($(NO_PERF_REGS),0) The CFLAGS actually should applied to the s390 block and not in the x86 block. Somehow this got messed up with git cherryp-pick / am. So actually, this should go into the section above: diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index ed65e82..0833d9f 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -55,6 +55,7 @@ endif ifeq ($(ARCH),s390) NO_PERF_REGS := 0 + CFLAGS += -fPIC endif ifeq ($(NO_PERF_REGS),0)