From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id D9A193858D28 for ; Fri, 24 Mar 2023 10:19:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9A193858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de 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 986EF219BE; Fri, 24 Mar 2023 10:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1679653182; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=jbGE8So3Rdv189xpmIP43kLj7BklE0PttTtHvZ8TkzI=; b=Q2kDT8FMgrc7KCFFnPQZPEH0CRj/Vq+6RfRhwhVz0N+x1PQUtuYqEocz1gUjm9LTEyJWsN XbQEjjZkdp9cbMSNAMVYucBuw+Yxw9Q9Lc1e+dwX/2Qs6vOMvKTP5E2qdcXbMqiLe0Z1Dl Y/Yvd1q4NH2WsuMpVIzWjtTflsfnSBA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1679653182; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=jbGE8So3Rdv189xpmIP43kLj7BklE0PttTtHvZ8TkzI=; b=AJQIQk1EJebu0gZkJD4TDLaYQ5UbZa6XBCi3XZ9xtRBgMUPD6MwwH9WeBUMKrYtUYxlHwc YkKCxjyxJQZwFjBw== 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 7978E138ED; Fri, 24 Mar 2023 10:19:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id p/+IHD55HWSjPAAAMHmgww (envelope-from ); Fri, 24 Mar 2023 10:19:42 +0000 Date: Fri, 24 Mar 2023 11:19:42 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org cc: "Joseph S. Myers" , Jakub Jelinek Subject: [PATCH 1/2] Disallow -gno-dwarf, gno-dwarf-N, -gno-gdb and -gno-vms MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20230324101942.7978E138ED@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.8 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 List-Id: The following adds RejectNegative to the gdwarf, gdwarf-, ggdb and gvms options since the current behavior is to treat the negative variant the same as the positive variant. In particular -ggdb -gno-gdb do not cancel, and plain -gno-dwarf will enable (dwarf!) debug output. Rejecting the negative forms avoids interpreting sensible behavior to combinations of options like -gdwarf-5 -gno-dwarf-3 and sticks to the behavior that later -g options simply override earlier ones and the only negative form is -g0. Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard. * common.opt (gdwarf): Add RejectNegative. (gdwarf-): Likewise. (ggdb): Likewise. (gvms): Likewise. --- gcc/common.opt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index e558385c7f4..4546acb5b81 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3349,11 +3349,11 @@ Common Driver RejectNegative JoinedOrMissing Generate BTF debug information at default level. gdwarf -Common Driver JoinedOrMissing Negative(gdwarf-) +Common Driver JoinedOrMissing Negative(gdwarf-) RejectNegative Generate debug information in default version of DWARF format. gdwarf- -Common Driver Joined UInteger Var(dwarf_version) Init(DWARF_VERSION_DEFAULT) +Common Driver Joined UInteger Var(dwarf_version) Init(DWARF_VERSION_DEFAULT) RejectNegative Generate debug information in DWARF v2 (or later) format. gdwarf32 @@ -3365,7 +3365,7 @@ Common Driver Var(dwarf_offset_size,8) RejectNegative Use 64-bit DWARF format when emitting DWARF debug information. ggdb -Common Driver JoinedOrMissing +Common Driver JoinedOrMissing RejectNegative Generate debug information in default extended format. ginline-points @@ -3432,7 +3432,7 @@ gvariable-location-views=incompat5 Common Driver RejectNegative Var(debug_variable_location_views, -1) Init(2) gvms -Common Driver JoinedOrMissing +Common Driver JoinedOrMissing RejectNegative Generate debug information in VMS format. gxcoff -- 2.35.3