diff options
author | Craig Lorentzen <crlorentzen@gmail.com> | 2024-04-01 11:49:44 -0400 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-05-06 10:56:17 +0200 |
commit | 1c4f9684696bad3a602b388a414f2051f0365b3d (patch) | |
tree | 3422accfd093e9c8134df4c6fb3ec2bb798f7775 /Configurations | |
parent | 97c6489b39c966c6e5169b9b92ec5fa9a35c7ba3 (diff) |
Security hardening: Expose Build flags for Position Independed Execution (PIE)
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22596)
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/00-base-templates.conf | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf index 55da5ec56c..a9ccb0ced8 100644 --- a/Configurations/00-base-templates.conf +++ b/Configurations/00-base-templates.conf @@ -76,6 +76,22 @@ my %targets=( AR => "ar", ARFLAGS => "qc", CC => "cc", + bin_cflags => + sub { + my @flags = (); + if (!defined($disabled{pie})) { + push(@flags, "-fPIE"); + } + return join(" ", @flags); + }, + bin_lflags => + sub { + my @flags = (); + if (!defined($disabled{pie})) { + push(@flags, "-pie"); + } + return join(" ", @flags); + }, lflags => sub { my @libs = (); |