Web lists-archives.com

[PATCH 18/36] perf s390: Always build with -fPIC




From: Hendrik Brueckner <brueckner@xxxxxxxxxxxxxxxxxx>

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 <jonathan.hermann@xxxxxxxxxx>
Signed-off-by: Hendrik Brueckner <brueckner@xxxxxxxxxxxxxxxxxx>
Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Cc: Thomas Richter <tmricht@xxxxxxxxxxxxxxxxxx>
Cc: linux s390 list <linux-s390@xxxxxxxxxxxxxxx>
LPU-Reference: 1512031765-9382-1-git-send-email-brueckner@xxxxxxxxxxxxxxxxxx
Link: https://lkml.kernel.org/n/tip-a8wga8hrl0d0r84cal96fmgv@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
 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
 
 ifeq ($(SRCARCH),arm)
-- 
2.13.6