[D] Don't predefine GNU_StackGrowsDown on every target.

Every back-end defines STACK_GROWS_DOWNWARD, the condition should
instead be  checking whether it was defined as 1 or 0.

gcc/d/ChangeLog:

2019-01-20  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-builtins.cc (d_init_versions): Check value of
	STACK_GROWS_DOWNWARD.

From-SVN: r268106
This commit is contained in:
Iain Buclaw 2019-01-20 18:53:13 +00:00 committed by Iain Buclaw
parent 5e2a724199
commit 49686677ed
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2019-01-20 Iain Buclaw <ibuclaw@gdcproject.org>
* d-builtins.cc (d_init_versions): Check value of
STACK_GROWS_DOWNWARD.
2019-01-20 Iain Buclaw <ibuclaw@gdcproject.org>
* d-codegen.cc (identity_compare_p): Return false if seen built-in

View File

@ -417,9 +417,8 @@ d_init_versions (void)
if (!targetm.have_tls)
VersionCondition::addPredefinedGlobalIdent ("GNU_EMUTLS");
#ifdef STACK_GROWS_DOWNWARD
VersionCondition::addPredefinedGlobalIdent ("GNU_StackGrowsDown");
#endif
if (STACK_GROWS_DOWNWARD)
VersionCondition::addPredefinedGlobalIdent ("GNU_StackGrowsDown");
/* Should define this anyway to set us apart from the competition. */
VersionCondition::addPredefinedGlobalIdent ("GNU_InlineAsm");