Message ID | 20211224104626.12039-1-iain@sandoe.co.uk |
---|---|
State | Committed |
Commit | 8381075ff3f5f5aefcd7027d7c5136a0e61e654a |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DB4643858400 for <patchwork@sourceware.org>; Fri, 24 Dec 2021 10:47:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB4643858400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1640342821; bh=Lt896Z68/+bNmrvAg/bFAevSVXoulnMHFPfCv9Qqjdg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=f5jlWVBjByw07fcNSpkRzs9h3wD0KM90wKfg4XtzVitAbQHRDROuLsCnLJ+ZUshR+ 6w7OrTvqmiY44Q6MuqSDU7Dd2sPY1pr6kNw5nTZ9lK9b5d+IL0NcpzUhBcroJoDtDS 3nDwLxl17n4ghObeo7X6tQw4Or529c1Hu7z3YIaM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id EBCE93858D28 for <gcc-patches@gcc.gnu.org>; Fri, 24 Dec 2021 10:46:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EBCE93858D28 Received: by mail-wm1-x330.google.com with SMTP id b186-20020a1c1bc3000000b00345734afe78so4657443wmb.0 for <gcc-patches@gcc.gnu.org>; Fri, 24 Dec 2021 02:46:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:reply-to :mime-version:content-transfer-encoding; bh=Lt896Z68/+bNmrvAg/bFAevSVXoulnMHFPfCv9Qqjdg=; b=lw648m4QBAJ+ZPuv1ZXbECHiA4msMFAj+ODuMr5g+BkVx9sNrNb9oVw+tGwBV3US+W 1omXNGGVfT62VFNlYGsPGv6LWumK3+hqwipp/sNjY4S6gvjF3DLJ4jKszsgnppGiLTH6 srF9Xxs0QWX7zU7Q7zuFcF93lkpgE6okOgCXxx2+8icrTtNlTmv0ulZf1X4O43RakAOP YsfYghDWxDUZyxKVpAa6wxxYEd0IErCIlB5+KOMnl7YneatPpk02Aj9rLUm0DPHvEypk qDnYQe9J/3FtvdXY6kNSgJ6lYR/zo9TC6lJak6+j/qotiRipCrTuOu4FzyZZM28pgcSS M90g== X-Gm-Message-State: AOAM531IQHoGjx16Oreq5eESMdbub8Ay8Yx2Y87QtFjfPnYa+kKkROXi 2/eow/RLi3jjHavMRyZo1lLi5+KvmIY= X-Google-Smtp-Source: ABdhPJzGW3CrUdVYqOX+0ayL8QLZj7lQ84SVgpEotxpqrZnA95RV4ZId88cvgUptWHWA96iLWRtlIQ== X-Received: by 2002:a7b:cb90:: with SMTP id m16mr4357790wmi.183.1640342792098; Fri, 24 Dec 2021 02:46:32 -0800 (PST) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id f16sm13337179wmg.27.2021.12.24.02.46.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Dec 2021 02:46:31 -0800 (PST) X-Google-Original-From: Iain Sandoe <iain@sandoe.co.uk> To: gcc-patches@gcc.gnu.org Subject: [pushed] Darwin: Check for that flag-reorder-and-partition. Date: Fri, 24 Dec 2021 10:46:26 +0000 Message-Id: <20211224104626.12039-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Iain Sandoe via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: iain@sandoe.co.uk Cc: Iain Sandoe <iains.gcc@gmail.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
[pushed] Darwin: Check for that flag-reorder-and-partition.
|
|
Commit Message
Iain Sandoe
Dec. 24, 2021, 10:46 a.m. UTC
We were checking whether the flag had been set by the user, but not if
it was set to true. Which means that the check fails in its intent when
the user puts -fno-reorder-and-partition.
Tested on i686, powerpc and x86_64-darwin. Pushed to master, thanks
Iain
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/ChangeLog:
* config/darwin.c (darwin_override_options): When checking for the
flag-reorder-and-partition case, also check that it is set on.
---
gcc/config/darwin.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Fri, Dec 24, 2021 at 2:47 AM Iain Sandoe via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > We were checking whether the flag had been set by the user, but not if > it was set to true. Which means that the check fails in its intent when > the user puts -fno-reorder-and-partition. > > Tested on i686, powerpc and x86_64-darwin. Pushed to master, thanks > Iain > > Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> > > gcc/ChangeLog: > > * config/darwin.c (darwin_override_options): When checking for the > flag-reorder-and-partition case, also check that it is set on. > --- > gcc/config/darwin.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c > index 8ad5b26c980..e580319f761 100644 > --- a/gcc/config/darwin.c > +++ b/gcc/config/darwin.c > @@ -3336,6 +3336,7 @@ darwin_override_options (void) > (s)he knows why... */ I see you already pushed this code, it might be a good idea to also change (s)he to just they in the above comment too. Thanks, Andrew > if (generating_for_darwin_version < 9 > && OPTION_SET_P (flag_reorder_blocks_and_partition) > + && flag_reorder_blocks_and_partition > && ((global_options.x_flag_exceptions /* User, c++, java */ > && !OPTION_SET_P (flag_exceptions)) /* User specified... */ > || (global_options.x_flag_unwind_tables > -- > 2.24.3 (Apple Git-128) >
Hi Andrew, > On 24 Dec 2021, at 10:51, Andrew Pinski <pinskia@gmail.com> wrote: > > On Fri, Dec 24, 2021 at 2:47 AM Iain Sandoe via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> >> @@ -3336,6 +3336,7 @@ darwin_override_options (void) >> (s)he knows why... */ > > I see you already pushed this code, it might be a good idea to also > change (s)he to just they in the above comment too. done as below, thanks, Iain [pushed] Darwin: Amend a comment to be more inclusive [NFC]. As per title. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ChangeLog: * config/darwin.c (darwin_override_options): Make a comment more inclusive. --- gcc/config/darwin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 5045b68e8af..c8e8b9d9f86 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3339,10 +3339,10 @@ darwin_override_options (void) /* Disable -freorder-blocks-and-partition when unwind tables are being emitted for Darwin < 9 (OSX 10.5). - The strategy is, "Unless the User has specifically set/unset an unwind + The strategy is, "Unless the user has specifically set/unset an unwind flag we will switch off -freorder-blocks-and-partition when unwind tables - will be generated". If the User specifically sets flags... we assume - (s)he knows why... */ + will be generated". If the user specifically sets flags, we have to + assume they know why. */ if (generating_for_darwin_version < 9 && OPTION_SET_P (flag_reorder_blocks_and_partition) && flag_reorder_blocks_and_partition
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 8ad5b26c980..e580319f761 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3336,6 +3336,7 @@ darwin_override_options (void) (s)he knows why... */ if (generating_for_darwin_version < 9 && OPTION_SET_P (flag_reorder_blocks_and_partition) + && flag_reorder_blocks_and_partition && ((global_options.x_flag_exceptions /* User, c++, java */ && !OPTION_SET_P (flag_exceptions)) /* User specified... */ || (global_options.x_flag_unwind_tables