[dev-lang/python] add gdbm-1.9 patch, fixes bug 3159
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# HG changeset patch
|
||||
# User Martin v. Löwis <martin@v.loewis.de>
|
||||
# Date 1304919465 -7200
|
||||
# Node ID 749686064642118c5ccc8ad28105472321931353
|
||||
# Parent 4f3f67a595fb05f04d89ed906df911b743e47463
|
||||
Use --as-needed when linking libpython3.so. Closes #11347.
|
||||
Patch by Arfrever Frehtes Taifersar Arahesis.
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -76,6 +76,7 @@ PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIG
|
||||
# environment variables
|
||||
PY_CPPFLAGS= -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
|
||||
PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
|
||||
+NO_AS_NEEDED= @NO_AS_NEEDED@
|
||||
LDLAST= @LDLAST@
|
||||
SGI_ABI= @SGI_ABI@
|
||||
CCSHARED= @CCSHARED@
|
||||
@@ -459,7 +460,7 @@ libpython$(LDVERSION).so: $(LIBRARY_OBJS
|
||||
fi
|
||||
|
||||
libpython3.so: libpython$(LDVERSION).so
|
||||
- $(BLDSHARED) -o $@ -Wl,-hl$@ $^
|
||||
+ $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
|
||||
|
||||
libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
|
||||
$(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
||||
diff --git a/configure.in b/configure.in
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -525,6 +525,18 @@ then
|
||||
fi
|
||||
|
||||
|
||||
+AC_MSG_CHECKING([for -Wl,--no-as-needed])
|
||||
+save_LDFLAGS="$LDFLAGS"
|
||||
+LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
|
||||
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
+ [NO_AS_NEEDED="-Wl,--no-as-needed"
|
||||
+ AC_MSG_RESULT([yes])],
|
||||
+ [NO_AS_NEEDED=""
|
||||
+ AC_MSG_RESULT([no])])
|
||||
+LDFLAGS="$save_LDFLAGS"
|
||||
+AC_SUBST(NO_AS_NEEDED)
|
||||
+
|
||||
+
|
||||
# checks for UNIX variants that set C preprocessor variables
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user