diff options
-rw-r--r-- | project/extras.mk | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/project/extras.mk b/project/extras.mk index 99fa4f6..5cda9e8 100644 --- a/project/extras.mk +++ b/project/extras.mk @@ -12,6 +12,12 @@ CFLAGS_CONFIG += -DEXEC_PREFIX=\"$(EXEC_PREFIX)\" CFLAGS_CONFIG += -DVPATH=\"$(SOURCE_DIR)\" CFLAGS_CONFIG += -DPYTHONPATH=\"$(PYTHON_PATH)\" +LDFLAGS_DEPS += -Wl,--as-needed +LDFLAGS_DEPS += -lm -lpthread -lutil -ldl -lcrypt +LDFLAGS_DEPS += -Wl,--no-as-needed + +LDFLAGS_CONFIG += $(LDFLAGS_DEPS) + ifeq ($(ALL_STATIC),yes) CFLAGS_STATIC += -DPY_ALL_STATIC @@ -36,7 +42,8 @@ pyext/%$(OS_LIB_SUFFIX): LDFLAGS_DSOEXT = -Wl,-soname -Wl,$(subst pyext/,,$@) pyext/%$(OS_LIB_SUFFIX): LDFLAGS_DYNEXT = $(LDFLAGS_DSOEXT) $(LDFLAGS_PYEXT) pyext/%$(OS_LIB_SUFFIX): $(DSO_REF_SOLINK) - $(CC) -shared -o $@ $^ $(LDFLAGS_SHARED) $(LDFLAGS_DYNEXT) -l$(PACKAGE) + $(CC) -shared -o $@ $^ $(LDFLAGS_SHARED) $(LDFLAGS_DYNEXT) \ + -l$(PACKAGE) $(LDFLAGS_DEPS) # statically linked extension |