aboutsummaryrefslogtreecommitdiff
path: root/configure
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
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')
-rwxr-xr-xconfigure11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure b/configure
index 86942b2..6815216 100755
--- a/configure
+++ b/configure
@@ -685,6 +685,7 @@ get_gcc_base_ver
extra_host_zlib_configure_flags
extra_host_libiberty_configure_flags
stage1_languages
+host_libs_picflag
host_shared
extra_linker_plugin_flags
extra_linker_plugin_configure_flags
@@ -8596,6 +8597,16 @@ fi
+
+# 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
+
+
# By default, C and C++ are the only stage 1 languages.
stage1_languages=,c,