aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2022-06-25 13:07:43 +0100
committerIain Sandoe <iain@sandoe.co.uk>2022-12-07 11:16:31 +0000
commit05048fc29f0e36e814281270a19762c962c1d9d2 (patch)
tree18c40e56eb65abc333ecebe1de52b3b1c59316b3 /configure.ac
parent45e09c2eb9c2bdd34ef777e06ddc9908dd0664f9 (diff)
downloadgcc-05048fc29f0e36e814281270a19762c962c1d9d2.zip
gcc-05048fc29f0e36e814281270a19762c962c1d9d2.tar.gz
gcc-05048fc29f0e36e814281270a19762c962c1d9d2.tar.bz2
configure: When host-shared, pass --with-pic to in-tree lib configs.
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. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> ChangeLog: * Makefile.def: Pass host_libs_picflag to host dependent library configures. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (host_libs_picflag): New configure variable set to '--with-pic' when building 'host_shared'.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 07f4cc8..83bbc4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1868,8 +1868,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,