From patchwork Fri Mar 24 10:20:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 74476 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp512895vqo; Fri, 24 Mar 2023 03:21:46 -0700 (PDT) X-Google-Smtp-Source: AKy350Za9EHy72KBaauFedmVX7kdFCcqKuWA7U5QG4C6UVFRkb0Jap7wjo/PfQ4PanbVZ8ONLH4g X-Received: by 2002:a17:906:a21a:b0:931:3cbe:3778 with SMTP id r26-20020a170906a21a00b009313cbe3778mr2005189ejy.58.1679653306578; Fri, 24 Mar 2023 03:21:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679653306; cv=none; d=google.com; s=arc-20160816; b=tMKqS8KyA/+68IS1oiFl4Piitl4GDaTnr1UwXBGiBKDS/MQfxz3jiBa56nu3EEPtVN XgSsYOgoxNh+7aRN5zXUAB8LOloECO6CJgLU8d80xVRand/ssZv9yg4niGXlbzD1etEE paLg8qiaWb7cIJ6lSrFZkvkufUm+HlWGWKBzOa9sIgPK95pKdnJjqEwxMU5ZoWEoda/Q efjo+YwpKt/sxeOnPMKybAh1mB3MnXf/dw28bZDQvs0geqtr3dCeWysS3JCnx8bzkd9t XV7s9KrFlRQSyU1WLPQP8LpYm1E2TrUkCjZmwNRIP5pGcmI1z5t9/nDEgML9NSdVKuhV px3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:message-id :mime-version:subject:cc:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=RXcBjTbVHHM2eHwdlD+uVxbMBm7S+jyF7X7ecHb0CwM=; b=cajZ7Cu1UJQnu8FD3ld+aaff/IE4uW24kz8pLbPXhfAIn5uz3yfkJPv1y3sjcE+yCf yphZluZXeqj6LVrZ+xrC9/mtr3Pxnpwj8ByZiNSqpqp0g92KLIFtMLdtkIXwZxDH0axR EYuyXB59Se8RUdZ3WX/YngD2LoB8YdD1D8XNq5mGVQQBM+aVYndxVI5MNch2zqH5CBGg QUKPEoGf/8pc74UtBTJToWOSyac1/kW5k/Xq+ZTrznyTChDncfCxouXGAQDoDoeTdjhu tDtINaHrzm5JHc8OzW8IZA8jnrHXQ3QSlITgRS/WqmP+L28AQB72qkTNfdzC7Tk2VAoN lwGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=bKu1PFDh; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id tf13-20020a1709078d8d00b0093e79e46252si530383ejc.1036.2023.03.24.03.21.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 03:21:45 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=bKu1PFDh; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D4C63858436 for ; Fri, 24 Mar 2023 10:21:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D4C63858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679653288; bh=RXcBjTbVHHM2eHwdlD+uVxbMBm7S+jyF7X7ecHb0CwM=; h=Date:To:cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=bKu1PFDhftjIeo1x0N/2pPqs/2whEtzyoQKEfTAzbnDNg6hyj0Xr0EIc3jT7l8Wvg iSZOeQZ6XA0rxujMJ1qIMQg8m/fsI9YPCk4ZZeqnToprIkCPsyT8lEmygjs8Jw9dPh HZ+Rda645oqUiYb1DEWS4rvlequh9bHSe5Xwzetk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id C13813870898 for ; Fri, 24 Mar 2023 10:20:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C13813870898 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E491933A30; Fri, 24 Mar 2023 10:20:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C79A5138F1; Fri, 24 Mar 2023 10:20:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id XWodL1l5HWTwPAAAMHmgww (envelope-from ); Fri, 24 Mar 2023 10:20:09 +0000 Date: Fri, 24 Mar 2023 11:20:09 +0100 (CET) To: gcc-patches@gcc.gnu.org cc: "Joseph S. Myers" , Jakub Jelinek Subject: [PATCH 2/2] Remove Negative(gwarf-) from gdwarf MIME-Version: 1.0 Message-Id: <20230324102009.C79A5138F1@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761244144432377974?= X-GMAIL-MSGID: =?utf-8?q?1761244144432377974?= Prior to the removal of STABS support the gdwarf, gstabs, ... options formed a cycle with their Negative(..) option attribute. But that didn't actually have any effect since most of the options also are Joined or JoinedOrMissing for which there's no pruning of options and so once ran into the set_debug_level diagnostics reporting conflicting debug formats. The following removes the remains of that cycle, which is a Negative option from gdwarf to gdwarf-. With RejectNegative added the expected effect of -gdwarf-4 -gdwarf would be to enable DWARF5 support (but this doesn't happen for some reason). I think the more sensible behavior is that seen and implemented in opts.cc, the more specific -gdwarf-4 determines the DWARF level and a later or earlier -gdwarf becomes a no-op. So the Negative(..) annotation on gdwarf is just confusing. Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard. * common.opt (gdwarf): Remove Negative(gdwarf-). --- gcc/common.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/common.opt b/gcc/common.opt index 4546acb5b81..862c474d3c8 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3349,7 +3349,7 @@ Common Driver RejectNegative JoinedOrMissing Generate BTF debug information at default level. gdwarf -Common Driver JoinedOrMissing Negative(gdwarf-) RejectNegative +Common Driver JoinedOrMissing RejectNegative Generate debug information in default version of DWARF format. gdwarf-