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: 1738236 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=HtLFxV8B; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P9VVK2XQLz23j0 for ; Tue, 7 Feb 2023 02:26:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 216133858408 for ; Mon, 6 Feb 2023 15:26:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 216133858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675697206; 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=HtLFxV8BjyDvwtwyNqkyKxDaI4H+tU0+rSgqRioKSGiC5VTIea77dPYUDHHuBG9zi tmViDhU2rm52emdrZrXqa3Twn57ZvMHLdqOpR0qiT80KuNHTFRPduvA7vf9Ozg78xw A6YiSK6kPY0yvx4aMTtWqCGtxjMSrnru8jjbMDbU= 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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: