From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id CE4A23858D39; Mon, 27 Mar 2023 06:45:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE4A23858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679899540; bh=RxN6M9YDos7JfIYVZYdWXMqUuXU9gNS1HJd105eB+P8=; h=From:To:Subject:Date:From; b=M5o7ueTfWHXZiTFuczTNp43oYx6M7TKAiz18KC3JHsPmsHdtyUd6qdFt57be1nNXp 2U0jXLbPRUE/nLc4PynMWFMGY84kgYPlmBshfjFdFuJl859/PB+WgV0y43SxgP+Xxs T+NEF4GqzEP/0dcy+tSXAIpIcLybl7jB61CwKuTo= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6872] lto/109263 - lto-wrapper and -g0 -ggdb X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 1e20bb6737e1173a0c3ef3e9e48c0eda40985ded X-Git-Newrev: 4cbd5ef0350d8ab04993eb4c48ab80999fb4f358 Message-Id: <20230327064540.CE4A23858D39@sourceware.org> Date: Mon, 27 Mar 2023 06:45:40 +0000 (GMT) List-Id: https://gcc.gnu.org/g:4cbd5ef0350d8ab04993eb4c48ab80999fb4f358 commit r13-6872-g4cbd5ef0350d8ab04993eb4c48ab80999fb4f358 Author: Richard Biener Date: Thu Mar 23 16:56:53 2023 +0100 lto/109263 - lto-wrapper and -g0 -ggdb The following makes lto-wrapper deal with non-combined debug disabling / enabling option combinations properly. Interestingly -gno-dwarf also enables debug. PR lto/109263 * lto-wrapper.cc (run_gcc): Parse alternate debug options as well, they always enable debug. Diff: --- 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;