diff options
author | Ned Deily <nad@python.org> | 2016-09-06 22:09:20 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2016-09-06 22:09:20 (GMT) |
commit | 8482ce4868afe9d77cf312a29b6ccf0ab76dd1b8 (patch) | |
tree | 22173a9674e5c653afd979386ddb9b1ff337dd25 /configure.ac | |
parent | b84fd04f3954ce90001cfde3847e3bb4863f0220 (diff) | |
download | cpython-8482ce4868afe9d77cf312a29b6ccf0ab76dd1b8.zip cpython-8482ce4868afe9d77cf312a29b6ccf0ab76dd1b8.tar.gz cpython-8482ce4868afe9d77cf312a29b6ccf0ab76dd1b8.tar.bz2 |
Issue #21122: Fix LTO builds on OS X.
Patch by Brett Cannon.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b4c7016..1e77c66 100644 --- a/configure.ac +++ b/configure.ac @@ -1299,13 +1299,20 @@ fi], if test "$Py_LTO" = 'true' ; then case $CC in *clang*) - # Any changes made here should be reflected in the GCC+Darwin case below - LTOFLAGS="-flto" + case $ac_sys_system in + Darwin*) + # Any changes made here should be reflected in the GCC+Darwin case below + LTOFLAGS="-flto -Wl,-export_dynamic" + ;; + *) + LTOFLAGS="-flto" + ;; + esac ;; *gcc*) case $ac_sys_system in Darwin*) - LTOFLAGS="-flto" + LTOFLAGS="-flto -Wl,-export_dynamic" ;; *) LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" |