diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-05-09 05:37:45 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-05-09 05:37:45 (GMT) |
commit | 48e14d3fdac9902429dc5312252073389a538a17 (patch) | |
tree | 785086f8f61e822ba2928e1af4ab6e4118d9c366 /configure.in | |
parent | 19f7ca25e5dc746b0f52d610ba1b2a80ec329c50 (diff) | |
download | cpython-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.in | 12 |
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 |