[D] Don't predefine GNU_StackGrowsDown on every target.
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 20 Jan 2019 18:53:13 +0000 (18:53 +0000)
committerIain Buclaw <ibuclaw@gcc.gnu.org>
Sun, 20 Jan 2019 18:53:13 +0000 (18:53 +0000)
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

gcc/d/ChangeLog
gcc/d/d-builtins.cc

index aa3bb7f90417ff5b4161f179932f05c8f4941fa1..32160db1d3656e29fd126b0939754f0a64208cf7 100644 (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
index 564e8c6a7b13257056381b2d2196bc3e48727ac0..b0a315a3ed9ad0a96655eb7c5fa9d6b1f41fc50d 100644 (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");