public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Always default to DWARF2 debug for cygwin and mingw
@ 2021-09-10  6:38 Richard Biener
  2021-09-10 15:17 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Biener @ 2021-09-10  6:38 UTC (permalink / raw)
  To: 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  <rguenther@suse.de>

	* 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
 <http://www.gnu.org/licenses/>.  */
 
-#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
 <hr />
 @end html
-- 
2.31.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Always default to DWARF2 debug for cygwin and mingw
  2021-09-10  6:38 [PATCH] Always default to DWARF2 debug for cygwin and mingw Richard Biener
@ 2021-09-10 15:17 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2021-09-10 15:17 UTC (permalink / raw)
  To: Richard Biener, gcc-patches



On 9/10/2021 12:38 AM, Richard Biener via Gcc-patches wrote:
> 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  <rguenther@suse.de>
>
> 	* 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.
OK.

jeff


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-10 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10  6:38 [PATCH] Always default to DWARF2 debug for cygwin and mingw Richard Biener
2021-09-10 15:17 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).