diff options
author | midipix <writeonce@midipix.org> | 2018-12-06 22:34:56 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-12-06 22:49:09 -0500 |
commit | ad6da54be6d28f6100ccb0d519f5a0c16df960cf (patch) | |
tree | 3e3c2b75b4ee19fa0e19bec803912a41782ec19d /project | |
parent | 7cb4f6c5340a3412328ad1bdc05a9ee6914abd13 (diff) | |
download | sbpython2-ad6da54be6d28f6100ccb0d519f5a0c16df960cf.tar.bz2 sbpython2-ad6da54be6d28f6100ccb0d519f5a0c16df960cf.tar.xz |
shared library linking: properly support systems with separate libc modules.
Diffstat (limited to 'project')
-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 |