Blob Blame History Raw
From: Ole Streicher <olebole@debian.org>
Date: Thu, 1 Dec 2016 21:18:56 +0100
Subject: Fix shared lib flags so that the package can be built on s390x

---
 util/makefile.common | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/util/makefile.common b/util/makefile.common
index 76adf8f..35116e1 100644
--- a/util/makefile.common
+++ b/util/makefile.common
@@ -171,9 +171,8 @@ FLAGS_DEF += $(shell $(CCTEST))
 ## environment variable in your shell.
 ## With gcc 4.2 and later, gcc should be able to make the optimal choice on its own.
 ## See the README section "I wanna go fast!" for more details.
-ifneq ($(origin ARCH_FLAGS),undefined)
-  FLAGS_DEF += $(ARCH_FLAGS)
-else
+ARCH_FLAGS := "system"
+ifndef ARCH_FLAGS
   # Try to guess some good compiler flags for this CPU.
 
   # Use -march=native if it's available (gcc 4.2 and above)
@@ -281,7 +280,7 @@ endif
 endif
 
 ifneq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
-FLAGS_DEF += -fpic
+FLAGS_DEF += -fpic -fPIC
 endif
 
 # profily!