]> git.ipfire.org Git - thirdparty/gcc.git/commit
configure, Darwin: Ensure overrides to host-pie are passed to gcc configure.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 17 Jun 2023 14:27:39 +0000 (15:27 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 25 Jun 2023 09:16:39 +0000 (10:16 +0100)
commitc1fecabe6597801856513aadc71a38e589697fbd
tree45bd911d556ba38eff0ff39ff1d3ad69266e6ff9
parent319e6fe96027f53719fd07b5ed057100b19ac802
configure, Darwin: Ensure overrides to host-pie are passed to gcc configure.

The latest versions of Darwin on the Aarch64 platform mandate PIE executables.
On x86_64 it remains optional, but produces tool warnings after Darwin20, so
we default to PIE executables there too.

All (non-PowerPC) 64b Darwin platforms mandate PIC code and therefore force
host_shared on (we issue a diagnostic if the user tries to configure them
non-shared).

However, this also means we cannot test the host_shared setting independently
of the host_pie setting so that the logic for setting PICFLAG must be amended
for Darwin.

For Darwin versions required to have PIE executables, in the event that the
user tries to configure these as --disable-host-pie, we issue a warning and
override the setting.  These versions must also switch host_pie on even if it
is not given in the configure line.  To cater for this we pass the current
value of host_pie, as determined by top-level configure, to the GCC configure.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
ChangeLog:

* Makefile.def: Pass the enable-host-pie value to GCC configure.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Adjust the logic for shared and PIE host flags to
ensure that PIE is passed for hosts that require it.
Makefile.def
Makefile.in
configure
configure.ac