public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102255] New: target uses STABS by default
@ 2021-09-09 12:50 rguenth at gcc dot gnu.org
  2021-09-09 12:58 ` [Bug target/102255] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-09 12:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102255

            Bug ID: 102255
           Summary: target uses STABS by default
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

The STABS debugging format is supposed to be deprecated for GCC 12 but these
targets still default to it from config.gcc including dbxcoff.h:

i[34567]86-*-cygwin*
x86_64-*-cygwin*
i[34567]86-*-mingw* | x86_64-*-mingw*

the configs include i386/cygming.h as well override that with DWARF when

#if TARGET_64BIT_DEFAULT || defined (HAVE_GAS_PE_SECREL32_RELOC)

the HAVE_GAS_PE_SECREL32_RELOC define/check is from 2004 it seems that's
old enough to require.  In fact install.texi suggests 2.20 is the minimal
supported version for cygwin, mingw does not document any required version.

I'm inclined to

diff --git a/gcc/config/dbxcoff.h b/gcc/config/dbxcoff.h
index d491cff961f..bd705f93711 100644
--- a/gcc/config/dbxcoff.h
+++ b/gcc/config/dbxcoff.h
@@ -25,12 +25,6 @@ along with GCC; see the file COPYING3.  If not see

 #define DBX_DEBUGGING_INFO 1

-/* Generate DBX debugging information by default.  */
-
-#ifndef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-#endif
-
 /* Be function-relative for block and source line stab directives.  */

 #define DBX_BLOCKS_FUNCTION_RELATIVE 1
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index ac458cdfee1..e2d759a7572 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #if (DWARF2_DEBUGGING_INFO)
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 #else
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
 #endif

 #undef TARGET_SEH

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

* [Bug target/102255] target uses STABS by default
  2021-09-09 12:50 [Bug target/102255] New: target uses STABS by default rguenth at gcc dot gnu.org
@ 2021-09-09 12:58 ` rguenth at gcc dot gnu.org
  2021-09-10  5:59 ` cvs-commit at gcc dot gnu.org
  2021-09-21 11:33 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-09 12:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102255

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|i[34567]86-*-cygwin*,       |i[34567]86-*-cygwin*,
                   |x86_64-*-cygwin*,           |x86_64-*-cygwin*,
                   |i[34567]86-*-mingw*,        |i[34567]86-*-mingw*,
                   |x86_64-*-mingw*             |x86_64-*-mingw*,
                   |                            |i?86-*-darwin*

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
i?86-*-darwin* also uses STABS for pre-darwin9 32bit compiles via i386/darwin.h

/* Darwin on x86_64 uses dwarf-2 by default.  Pre-darwin9 32-bit
   compiles default to stabs+.  darwin9+ defaults to dwarf-2.  */
#ifndef DARWIN_PREFER_DWARF
#undef PREFERRED_DEBUGGING_TYPE
#ifdef HAVE_AS_STABS_DIRECTIVE
#define PREFERRED_DEBUGGING_TYPE (TARGET_64BIT ? DWARF2_DEBUG : DBX_DEBUG)
#else
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#endif
#endif

but it looks like DARWIN_PREFER_DWARF is always set.

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

* [Bug target/102255] target uses STABS by default
  2021-09-09 12:50 [Bug target/102255] New: target uses STABS by default rguenth at gcc dot gnu.org
  2021-09-09 12:58 ` [Bug target/102255] " rguenth at gcc dot gnu.org
@ 2021-09-10  5:59 ` cvs-commit at gcc dot gnu.org
  2021-09-21 11:33 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-10  5:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102255

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:0458154caafc5438cecf1db8cf96076e384244ab

commit r12-3436-g0458154caafc5438cecf1db8cf96076e384244ab
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Sep 9 15:08:22 2021 +0200

    Remove dbx.h, do not set PREFERRED_DEBUGGING_TYPE from dbxcoff.h, lynx.h

    The following removes the unused config/dbx.h file and removes the
    setting of PREFERRED_DEBUGGING_TYPE from dbxcoff.h which is
    overridden by all users (djgpp/mingw/cygwin) via either including
    config/i386/djgpp.h or config/i386/cygming.h

    There are still circumstances where mingw and cygwin default to
    STABS, namely when HAVE_GAS_PE_SECREL32_RELOC is not defined and
    the target defaults to 32bit code generation.

    The new style handling DBX_DEBUGGING_INFO is in line with
    dbxelf.h which does not define PREFERRED_DEBUGGING_TYPE either.

    The patch also removes the PREFERRED_DEBUGGING_TYPE define from
    lynx.h which always follows elfos.h already defaulting to DWARF,
    so the comment about STABS being the default is misleading and
    outdated.

    2021-09-09  Richard Biener  <rguenther@suse.de>

            PR target/102255
            * config/dbx.h: Remove.
            * config/dbxcoff.h: Do not define PREFERRED_DEBUGGING_TYPE.
            * config/lynx.h: Likewise.

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

* [Bug target/102255] target uses STABS by default
  2021-09-09 12:50 [Bug target/102255] New: target uses STABS by default rguenth at gcc dot gnu.org
  2021-09-09 12:58 ` [Bug target/102255] " rguenth at gcc dot gnu.org
  2021-09-10  5:59 ` cvs-commit at gcc dot gnu.org
@ 2021-09-21 11:33 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-21 11:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102255

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-09-21 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 12:50 [Bug target/102255] New: target uses STABS by default rguenth at gcc dot gnu.org
2021-09-09 12:58 ` [Bug target/102255] " rguenth at gcc dot gnu.org
2021-09-10  5:59 ` cvs-commit at gcc dot gnu.org
2021-09-21 11:33 ` rguenth at gcc dot gnu.org

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).