diff options
author | 2011-05-09 07:37:45 +0200 | |
---|---|---|
committer | 2011-05-09 07:37:45 +0200 | |
commit | 48e14d3fdac9902429dc5312252073389a538a17 (patch) | |
tree | 785086f8f61e822ba2928e1af4ab6e4118d9c366 /configure.in | |
parent | #11910: merge with 3.1. (diff) | |
download | cpython-48e14d3fdac9902429dc5312252073389a538a17.tar.gz cpython-48e14d3fdac9902429dc5312252073389a538a17.tar.bz2 cpython-48e14d3fdac9902429dc5312252073389a538a17.zip |
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 aaeb9bc31c0..8dc56a3d0f6 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 |