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 BB05E3858C31 for ; Thu, 23 Mar 2023 16:00:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB05E3858C31 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 1BF42337DA; Thu, 23 Mar 2023 16:00:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1679587230; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=d+D3Ks9DjcbBMGQmM5DQGKoueZnygfFj1KHN3YZGOa4=; b=Htz5ZjtRPRKMQg/S5VTMRIn8g/NMFnfjAMzgT+GF5cFkVO5V+JjLgCoLWx8ZjJpTUcdKet r2fU0SKM90DIY5GAg3k7MUHh6uPSH7kuszHHxtUu+oos0XSDo7w0fsgnA4OG7AF6X1bL/e CPbVN/qfJ5Ehdw/I+fTTZIzQoVNRmC0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1679587230; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=d+D3Ks9DjcbBMGQmM5DQGKoueZnygfFj1KHN3YZGOa4=; b=ijV+BAnZiMfwGN5A8hTd7Hnd6f9yGX7hVdny+SmlRXYn5e2CHxoCYeG6ztN0iFYXrqre+K UQQjbtGYJXvE+sAg== 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 02D4813596; Thu, 23 Mar 2023 16:00:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Y3gQO513HGSnOAAAMHmgww (envelope-from ); Thu, 23 Mar 2023 16:00:29 +0000 Date: Thu, 23 Mar 2023 17:00:29 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org cc: Jakub Jelinek Subject: [PATCH] lto/109263 - lto-wrapper and -g0 -ggdb MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20230323160030.02D4813596@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 makes lto-wrapper deal with non-combined debug disabling / enabling option combinations properly. Interestingly -gno-dwarf also enables debug. Bootstrap / regtest running on x86_64-unknown-linux-gnu. OK? Or do we want to try harder to zap earlier -g0 when later -g* appear? PR lto/109263 * lto-wrapper.c (run_gcc): Parse alternate debug options as well, they always enable debug. --- gcc/lto-wrapper.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc index fe8c5f6e80d..5186d040ce0 100644 --- a/gcc/lto-wrapper.cc +++ b/gcc/lto-wrapper.cc @@ -1564,6 +1564,16 @@ run_gcc (unsigned argc, char *argv[]) skip_debug = option->arg && !strcmp (option->arg, "0"); break; + case OPT_gbtf: + case OPT_gctf: + case OPT_gdwarf: + case OPT_gdwarf_: + case OPT_ggdb: + case OPT_gvms: + /* Negative forms, if allowed, enable debug info as well. */ + skip_debug = false; + break; + case OPT_dumpdir: incoming_dumppfx = dumppfx = option->arg; break; -- 2.35.3