From patchwork Mon Feb 6 15:26:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 53344 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2296216wrn; Mon, 6 Feb 2023 07:27:11 -0800 (PST) X-Google-Smtp-Source: AK7set95sqvn/IYyJQckrDPNlqVofTqy4S98AeX1hQFx2+Rq8cXgAi8A5va6fO8mLMoY1xMjm6WJ X-Received: by 2002:a17:906:4b09:b0:883:4ce3:99c2 with SMTP id y9-20020a1709064b0900b008834ce399c2mr18124528eju.34.1675697231383; Mon, 06 Feb 2023 07:27:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675697231; cv=none; d=google.com; s=arc-20160816; b=hwqPL8awCEs4eHvZxCUV8tSG96G8ApHfpQjBSxcCIF7ltj3xzV8eLqYRgcJq/yYi48 9ZHOItVHSomx0xMWqB/p4/xRs8zTVYyPCz5PE30CocW+TJDb/oMhnopRtIPANNdaMATC ZjpZLEIwYxIjGUoJ4UDPcRnEAy0yrH6/czIh6/Rgaivrf/5GgQycaEUPswVIS924NXYc eZkJtYsxDz8jUBV8A5XzWNRhXs5UTy9Hp/RwBerl/apoVyQqerCRiG8Lw86EFwcufEXx Rt0Twx2RMQn208ik64fRVagF4jOQHjFN/Q//sBEABEZCxqq/ZUUQFy/h9EELLtUbahmv n+OA== 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:mime-version :user-agent:message-id:date:subject:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=hfh3Zb4PCCcxFit/j5bdvOW7P25vD5H5xfzdjM+iz7g=; b=sRzOUWyCzZeNjWB+2X5kzQ51wYv9Ve2CjkvRMs1oMAGtfNRrplos4nCdACpOh1dAgk Ufc+vGKIn1+LfIELFbK9CF8CcRsJrxtNHv/5szg4SMBEnUfxAWRcH3NiKjsCLW4x/Zd8 KD+vSQ43dZ4zqfp5GvC8zx4z1/BmGc5R69ehlpTU7J7LeD+02t6/gp/odwoHt3+uwVjB pcNVC/PXT0TUrqepKiO/T1lUdUIEjqTE19CAh8dN92+sRpKTySRRdl/+kUWxPe+BkBzq DG/xhnaHqmN8dtabQEfydng9IlHMaiVGkVGcAFTki5/yp7kqr0HeY+4HtghSVqkrFylP 38Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=qLT0O6rw; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id fm13-20020a1709072acd00b0088c9be4a28dsi13071182ejc.516.2023.02.06.07.27.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 07:27:11 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=qLT0O6rw; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 C02ED3858408 for ; Mon, 6 Feb 2023 15:27:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C02ED3858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675697229; bh=hfh3Zb4PCCcxFit/j5bdvOW7P25vD5H5xfzdjM+iz7g=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=qLT0O6rwpOGS7SK6ZmcORLnGhk7SZD0IJ0LE5IOxnQZiFGDSLsjm7zRmAtGX2pMsx aKgvixlVEnsMko9gduBBMiW/eceB42xb/r1s98f+ceeEzOCnjxO3gsLKWZ3p+j32QB xTTV0vAEPCBpcDPwI+8o1q5pf3I0AUjL63chmsFQ= 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 417003858D38 for ; Mon, 6 Feb 2023 15:26:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 417003858D38 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 2AE5B3F471 for ; Mon, 6 Feb 2023 15:26:25 +0000 (UTC) Received: from hawking.suse.de (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id 1F8D72C141 for ; Mon, 6 Feb 2023 15:26:25 +0000 (UTC) Received: by hawking.suse.de (Postfix, from userid 17005) id D9A63442F16; Mon, 6 Feb 2023 16:26:24 +0100 (CET) To: gcc-patches@gcc.gnu.org Subject: [PATCH] lto-wrapper: Pass through -funwind-tables and -fasynchronous-unwind-tables X-Yow: WHOA!! I'm having a RELIGIOUS EXPERIENCE right NOW!! Date: Mon, 06 Feb 2023 16:26:24 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Spam-Status: No, score=-9.1 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: Andreas Schwab via Gcc-patches From: Andreas Schwab Reply-To: Andreas Schwab 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?1757095900556192784?= X-GMAIL-MSGID: =?utf-8?q?1757095900556192784?= The -funwind-tables and -fasynchronous-unwind-tables options are relevant for the output pass, so they need to be passed through by the LTO wrapper. Otherwise, dwarf2out_assembly_start may output a ".cfi_sections .debug_frame" directive when debug info was enabled even if every translation unit was compiled with -funwind-tables. gcc/ * lto-wrapper.cc (merge_and_complain): Handle -funwind-tables and -fasynchronous-unwind-tables. (append_compiler_options): Likewise. --- gcc/lto-wrapper.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc index 11c4d1b38a4..fe8c5f6e80d 100644 --- a/gcc/lto-wrapper.cc +++ b/gcc/lto-wrapper.cc @@ -335,6 +335,8 @@ merge_and_complain (vec &decoded_options, case OPT_fopenmp: case OPT_fopenacc: + case OPT_fasynchronous_unwind_tables: + case OPT_funwind_tables: /* For selected options we can merge conservatively. */ if (existing_opt == -1) decoded_options.safe_push (*foption); @@ -737,6 +739,8 @@ append_compiler_options (obstack *argv_obstack, vec opts) case OPT_fopenacc_dim_: case OPT_foffload_abi_: case OPT_fcf_protection_: + case OPT_fasynchronous_unwind_tables: + case OPT_funwind_tables: case OPT_g: case OPT_O: case OPT_Ofast: