From patchwork Sun Jan 20 18:53:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1028212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-494390-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gdcproject.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="wGHCSXyl"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43jP3t6vR6z9sBZ for ; Mon, 21 Jan 2019 05:54:16 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=Hb+qJm9clZ2StC46EKKX/lmgBJl+8lMl5N6mIGQgzoE6MC x1PcsufegHNvSacMofOUI5iwc7bDkfnVGVpS3LvrY9/EtEA4u7+6CnJwVufpbw+Z 6Rkr0maXw4b+BnHCfQTK9FLQhjbS0BuJ1MkX7SyHaHtca92/YwMxbvcd0fMdI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=d9MfRv7sepm6JLcu4KB5fZ4RpZI=; b=wGHCSXyloTbfKNqCnwcv c9h04P3wE2ev98c1IwY0kmBUi7TZQ1HrJFI3JjeygiyxoWR2wNBfc03nI3fV/txU NlLsF3Z5OL5qmB+bp28dEJUBbIabs9wQp8rhjSv8mNRtyhSxGmEHiqanvymqYSh3 eM1sHZsFRTc0s24OCY5NqkQ= Received: (qmail 117681 invoked by alias); 20 Jan 2019 18:54:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 117666 invoked by uid 89); 20 Jan 2019 18:54:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=Should X-HELO: mail-qt1-f178.google.com Received: from mail-qt1-f178.google.com (HELO mail-qt1-f178.google.com) (209.85.160.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 20 Jan 2019 18:53:58 +0000 Received: by mail-qt1-f178.google.com with SMTP id u47so20855954qtj.6 for ; Sun, 20 Jan 2019 10:53:58 -0800 (PST) MIME-Version: 1.0 From: Iain Buclaw Date: Sun, 20 Jan 2019 19:53:45 +0100 Message-ID: Subject: [PATCH, d] Committed fix GNU_StackGrowsDown version always predefined To: gcc-patches X-IsSubscribed: yes Hi, This patch fixes a small logic bug, where GNU_StackGrowsDown was always predefined in the D language environment. Instead, don't define it where STACK_GROWS_DOWNWARD is defined as zero. With this, the correct libphobos code paths will now be compiled on hppa-* targets. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to trunk as r268106. diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc index 564e8c6a7b1..b0a315a3ed9 100644 --- a/gcc/d/d-builtins.cc +++ b/gcc/d/d-builtins.cc @@ -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");