From patchwork Fri Sep 10 06:38:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1526385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=qTbDwRp/; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H5R6j4hZcz9sW8 for ; Fri, 10 Sep 2021 16:39:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0CB3C384A88A for ; Fri, 10 Sep 2021 06:39:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CB3C384A88A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1631255946; bh=C/b8TZ2OE6n8j6jFEuj/sMU/oV7EtI7zzM2WcrUBPJw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=qTbDwRp/0QslM1krBdH459DrsqQyeUuRuUz7IUG34Zj7A7hmTfJDABS/A9Ah4V7ad CcbZbMXdOvh+Gi7UcDV4UIH3uOPZgCWNplGsztps1hhMdtCjqEMDzVHqh9HpFGEbku zoTwWNjEzAh2ZFUQnpnlokqet95jNcc4zzvl3o+4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id D85FD3858C39 for ; Fri, 10 Sep 2021 06:38:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D85FD3858C39 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-out2.suse.de (Postfix) with ESMTPS id 9FD1E1FD52; Fri, 10 Sep 2021 06:38:44 +0000 (UTC) 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 88FA313D12; Fri, 10 Sep 2021 06:38:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id G/cmIHT9OmHXHwAAMHmgww (envelope-from ); Fri, 10 Sep 2021 06:38:44 +0000 Date: Fri, 10 Sep 2021 08:38:44 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [PATCH] Always default to DWARF2 debug for cygwin and mingw Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This removes the fallback to STABS as default for cygwin and mingw when the assembler does not support .secrel32 and the default is to emit 32bit code. Support for .secrel32 was added to binutils 2.16 released in 2005 so instead document that as requirement. I left the now unused check for .secrel32 in configure around in case somebody wants to turn that into an error or warning. OK for trunk? As before I have no good means to test this but it should change nothing for people using binutils 2.16+ 2021-09-10 Richard Biener * config/i386/cygming.h: Always default to DWARF2 debugging. Do not define DBX_DEBUGGING_INFO, that's done via dbxcoff.h already. * doc/install.texi: Document binutils 2.16 as minimum requirement for mingw. --- gcc/config/i386/cygming.h | 9 --------- gcc/doc/install.texi | 4 ++++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index ac458cdfee1..da872d10cd3 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -18,17 +18,10 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ -#define DBX_DEBUGGING_INFO 1 -#if TARGET_64BIT_DEFAULT || defined (HAVE_GAS_PE_SECREL32_RELOC) #define DWARF2_DEBUGGING_INFO 1 -#endif #undef PREFERRED_DEBUGGING_TYPE -#if (DWARF2_DEBUGGING_INFO) #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG -#else -#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG -#endif #undef TARGET_SEH #define TARGET_SEH (TARGET_64BIT_MS_ABI && flag_unwind_tables) @@ -97,7 +90,6 @@ along with GCC; see the file COPYING3. If not see #undef DWARF_FRAME_REGISTERS #define DWARF_FRAME_REGISTERS (TARGET_64BIT ? 33 : 17) -#ifdef HAVE_GAS_PE_SECREL32_RELOC /* Use section relative relocations for debugging offsets. Unlike other targets that fake this by putting the section VMA at 0, PE won't allow it. */ @@ -129,7 +121,6 @@ along with GCC; see the file COPYING3. If not see gcc_unreachable (); \ } \ } while (0) -#endif #define TARGET_EXECUTABLE_SUFFIX ".exe" diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 99b44706836..88e453c3f6b 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -5131,6 +5131,10 @@ GCC will build with and support only MinGW runtime 3.12 and later. Earlier versions of headers are incompatible with the new default semantics of @code{extern inline} in @code{-std=c99} and @code{-std=gnu99} modes. +To support emitting DWARF debugging info you need to use GNU binutils +version 2.16 or above containing support for the @code{.secrel32} +assembler pseudo-op. + @html
@end html