[PATCH] New option --enable-pie-programs
Florian Weimer
fweimer@redhat.com
Wed Nov 17 08:39:19 GMT 2021
* Siddhesh Poyarekar:
> On 11/16/21 19:28, Florian Weimer wrote:
>> * Siddhesh Poyarekar:
>>
>>> Add a new option --enable-pie-programs to build tests and binaries as
>>> PIE. This allows building all dynamic programs in glibc (e.g.
>>> iconvconfig, getconf, etc.) as PIE on architectures that do not have
>>> -static-pie.
>> Please integrate this in some way with libc_cv_cc_pie_default and
>> libc_cv_pie_default. Probably --enable-pie-programs should default to
>> yes if the toolchain defauls to PIE.
>
> AFAICT, libc_cv_cc_pie_default is only to set -fno-pie for non-PIE
> linking with a toolchain that defaults to pie. PIE linking otherwise
> is controlled accross the board with libc_cv_pie_default, which
> includes build-pie-default, static-pie and now pie-programs.
>
> So I reckon it is integrated; the new pie-programs variable is only to
> set CFLAGS to -fPIC.
--enable-pie-programs=no with a default-PIE toolchain still produces PIE
programs, right?
Thanks,
Florian
More information about the Libc-alpha
mailing list