[committed] d: Predefine the D_PIE version condition when flag_pie is set.
Iain Buclaw
ibuclaw@gdcproject.org
Sun Mar 28 15:53:48 GMT 2021
Hi,
This patch adds D_PIE to the list of predefined version conditions when
flag_pie is default, or set by the command-line. Same as the D_PIC
version condition.
Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and
committed to mainline.
Regards,
Iain.
---
gcc/d/ChangeLog:
* d-builtins.cc (d_init_versions): Predefine D_PIE if flag_pie is set.
---
gcc/d/d-builtins.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc
index c45edc2fa3f..ce098617c62 100644
--- a/gcc/d/d-builtins.cc
+++ b/gcc/d/d-builtins.cc
@@ -480,6 +480,8 @@ d_init_versions (void)
VersionCondition::addPredefinedGlobalIdent ("D_Coverage");
if (flag_pic)
VersionCondition::addPredefinedGlobalIdent ("D_PIC");
+ if (flag_pie)
+ VersionCondition::addPredefinedGlobalIdent ("D_PIE");
if (global.params.doDocComments)
VersionCondition::addPredefinedGlobalIdent ("D_Ddoc");
--
2.27.0
More information about the Gcc-patches
mailing list