Skip to content
Snippets Groups Projects
  • Iain Sandoe's avatar
    c1fecabe
    configure, Darwin: Ensure overrides to host-pie are passed to gcc configure. · c1fecabe
    Iain Sandoe authored
    
    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: default avatarIain 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.
    c1fecabe
    History
    configure, Darwin: Ensure overrides to host-pie are passed to gcc configure.
    Iain Sandoe authored
    
    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: default avatarIain 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.