no -fPIC for any static build
authorMiodrag Milanovic <mmicko@gmail.com>
Sat, 18 Aug 2018 17:17:02 +0000 (19:17 +0200)
committerMiodrag Milanovic <mmicko@gmail.com>
Sat, 18 Aug 2018 17:17:02 +0000 (19:17 +0200)
Makefile

index c3e3a4b47751bf83843fe51d32409ef7a24c8b98..c1e5c789db9a571529c1f64ef9c3c6c7f9754fda 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -159,10 +159,8 @@ ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H"
 else ifeq ($(CONFIG),gcc-static)
 LD = $(CXX)
 LDFLAGS := $(filter-out -rdynamic,$(LDFLAGS)) -s
-LDLIBS := -static $(filter-out -lrt,$(LDLIBS)) 
-ifeq ($(NO_FPIC),1)
+LDLIBS := $(filter-out -lrt,$(LDLIBS)) 
 CXXFLAGS := $(filter-out -fPIC,$(CXXFLAGS))
-endif
 CXXFLAGS += -std=c++11 -Os
 ABCMKARGS = CC="$(CC)" CXX="$(CXX)" LD="$(LD)" ABC_USE_LIBSTDCXX=1 LIBS="-lm -lpthread -static" OPTFLAGS="-O" \
                        ARCHFLAGS="-DABC_USE_STDINT_H -DABC_NO_DYNAMIC_LINKING=1 -Wno-unused-but-set-variable $(ARCHFLAGS)" ABC_USE_NO_READLINE=1