Skip to contentSkip to conversation

perf s390: Always build with -fPIC

tip:perf/core tip-bot for Hendrik Brueckner 1 participant 1 message Dec 6, 2017 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  1dc4ddf112a408e607a073d951b962b6c6e2bd6c
Gitweb:     https://git.kernel.org/tip/1dc4ddf112a408e607a073d951b962b6c6e2bd6c
Author:     Hendrik Brueckner <[email protected]>
AuthorDate: Thu, 30 Nov 2017 09:49:25 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 5 Dec 2017 10:24:32 -0300

perf s390: Always build with -fPIC

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.

Cc Heiko Carstens <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Thomas Richter <[email protected]>
Cc linux s390 list <[email protected]>

LPU-Reference: [email protected]

---
 tools/perf/Makefile.config | 1 +
 1 file changed, 1 insertion(+)
tools/perf/Makefile.config +1 -0
index 2c437ba..bf86c09 100644
@@ -41,6 +41,7 @@ ifeq ($(SRCARCH),x86)
     LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
   endif
   NO_PERF_REGS := 0
+  CFLAGS += -fPIC
 endif
 
 ifeq ($(SRCARCH),arm)