diff -r a7ce98a4e9e4 configure --- a/configure Thu Sep 01 23:29:04 2016 -0400 +++ b/configure Fri Sep 02 15:27:04 2016 -0700 @@ -774,7 +774,6 @@ docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -885,7 +884,6 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1138,15 +1136,6 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1284,7 +1273,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1437,7 +1426,6 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -6554,13 +6542,20 @@ 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" diff -r a7ce98a4e9e4 configure.ac --- a/configure.ac Thu Sep 01 23:29:04 2016 -0400 +++ b/configure.ac Fri Sep 02 15:27:04 2016 -0700 @@ -1247,13 +1247,20 @@ 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"