From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1675697185; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=hfh3Zb4PCCcxFit/j5bdvOW7P25vD5H5xfzdjM+iz7g=; b=mep9EuHaXz8c/mdkSiI4VU+mg2e9tTSUt9qAeNHcvXNTiGcTim8POKSx3Hlz/cE+ybdwnQ sHIPV5e+/6352kxt079D+HHoosZi0mxQiH9R/blPmr8GVCfGXRHWC15FDDowE6kfTzvGxm Px142dFaBESUP04IgWAoL3bZTo9g9Vg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1675697185; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=hfh3Zb4PCCcxFit/j5bdvOW7P25vD5H5xfzdjM+iz7g=; b=YhWEGjV71+wtga0FyQxST6R5g1EvNC2NT+lsdE6r+BlYlIy4vr4mKoMGl60la7kz2G7AKD jKjvSJMQmNOUk9BQ== 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) From: Andreas Schwab 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 Content-Type: text/plain 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 List-Id: 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: -- 2.39.1 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."