diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e95a9ed..86d10a6 100644 --- a/configure.ac +++ b/configure.ac @@ -2006,8 +2006,18 @@ AC_ARG_ENABLE(host-shared, x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;; *) host_shared=no ;; esac]) + AC_SUBST(host_shared) +# If we are building PIC/PIE host executables, and we are building dependent +# libs (e.g. GMP) in-tree those libs need to be configured to generate PIC +# code. +host_libs_picflag= +if test "$host_shared" = "yes";then +host_libs_picflag='--with-pic' +fi +AC_SUBST(host_libs_picflag) + # By default, C and C++ are the only stage 1 languages. stage1_languages=,c, |