summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-05-09 05:37:45 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-05-09 05:37:45 (GMT)
commit48e14d3fdac9902429dc5312252073389a538a17 (patch)
tree785086f8f61e822ba2928e1af4ab6e4118d9c366 /configure.in
parent19f7ca25e5dc746b0f52d610ba1b2a80ec329c50 (diff)
downloadcpython-48e14d3fdac9902429dc5312252073389a538a17.zip
cpython-48e14d3fdac9902429dc5312252073389a538a17.tar.gz
cpython-48e14d3fdac9902429dc5312252073389a538a17.tar.bz2
Use --as-needed when linking libpython3.so. Closes #11347.
Patch by Arfrever Frehtes Taifersar Arahesis.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index aaeb9bc..8dc56a3 100644
--- 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