public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove DARWIN_PREFER_DWARF and dead code
@ 2021-09-10  7:19 Richard Biener
  2021-09-10 15:16 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2021-09-10  7:19 UTC (permalink / raw)
  To: gcc-patches; +Cc: iain

This removes the always defined DARWIN_PREFER_DWARF and the code
guarded by it being not defined, removing the possibility to
default some i386 darwin configurations to STABS when it would
not be defined.

OK for trunk?

Thanks,
Richard.

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

	* config/darwin.h (DARWIN_PREFER_DWARF): Do not define.
	* config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Do not
	change based on DARWIN_PREFER_DWARF not being defined.
---
 gcc/config/darwin.h      |  3 +--
 gcc/config/i386/darwin.h | 11 -----------
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index f1d92f87e9a..6396586c138 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -499,9 +499,8 @@ extern GTY(()) int darwin_ms_struct;
 /* We now require C++11 to bootstrap and newer tools than those based on
    stabs, so require DWARF-2, even if stabs is supported by the assembler.  */
 
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-#define DARWIN_PREFER_DWARF
 #define DWARF2_DEBUGGING_INFO 1
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 #ifdef HAVE_AS_STABS_DIRECTIVE
 #define DBX_DEBUGGING_INFO 1
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index da0ae5b3ee7..c4a6f4dfda7 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -264,17 +264,6 @@ along with GCC; see the file COPYING3.  If not see
       target_flags &= ~MASK_MACHO_DYNAMIC_NO_PIC;			\
   } while (0)
 
-/* 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
-
 /* Darwin uses the standard DWARF register numbers but the default
    register numbers for STABS.  Fortunately for 64-bit code the
    default and the standard are the same.  */
-- 
2.31.1

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

* Re: [PATCH] Remove DARWIN_PREFER_DWARF and dead code
  2021-09-10  7:19 [PATCH] Remove DARWIN_PREFER_DWARF and dead code Richard Biener
@ 2021-09-10 15:16 ` Jeff Law
  2021-09-13 19:04   ` Iain Sandoe
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2021-09-10 15:16 UTC (permalink / raw)
  To: Richard Biener, gcc-patches; +Cc: iain



On 9/10/2021 1:19 AM, Richard Biener via Gcc-patches wrote:
> This removes the always defined DARWIN_PREFER_DWARF and the code
> guarded by it being not defined, removing the possibility to
> default some i386 darwin configurations to STABS when it would
> not be defined.
>
> OK for trunk?
>
> Thanks,
> Richard.
>
> 2021-09-10  Richard Biener  <rguenther@suse.de>
>
> 	* config/darwin.h (DARWIN_PREFER_DWARF): Do not define.
> 	* config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Do not
> 	change based on DARWIN_PREFER_DWARF not being defined.
OK.  I'm not too worried about supporting 32bit darwin 8 and earlier.  
That's got to be at least a decade out of service at this point.

jeff


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

* Re: [PATCH] Remove DARWIN_PREFER_DWARF and dead code
  2021-09-10 15:16 ` Jeff Law
@ 2021-09-13 19:04   ` Iain Sandoe
  0 siblings, 0 replies; 3+ messages in thread
From: Iain Sandoe @ 2021-09-13 19:04 UTC (permalink / raw)
  To: Jeff Law; +Cc: Richard Biener, gcc-patches

Hi Folks

> On 10 Sep 2021, at 16:16, Jeff Law <jeffreyalaw@gmail.com> wrote:
> On 9/10/2021 1:19 AM, Richard Biener via Gcc-patches wrote:
>> This removes the always defined DARWIN_PREFER_DWARF and the code
>> guarded by it being not defined, removing the possibility to
>> default some i386 darwin configurations to STABS when it would
>> not be defined.
>> 
>> OK for trunk?
>> 
>> Thanks,
>> Richard.
>> 
>> 2021-09-10  Richard Biener  <rguenther@suse.de>
>> 
>> 	* config/darwin.h (DARWIN_PREFER_DWARF): Do not define.
>> 	* config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Do not
>> 	change based on DARWIN_PREFER_DWARF not being defined.

Sorry, was OOO and without sensible connection.

As you saw I was part way through ripping out stabs for Darwin (I disabled it on the last cycle, but with an easy route to re-enabling should there be any fallout) - no one has complained - so the patch ought to be fine.

> OK.  I'm not too worried about supporting 32bit darwin 8 and earlier.  That's got to be at least a decade out of service at this point

The Darwin maintainers have had a policy of not breaking older versions on purpose (and I have gone along with that for now) - but if you want to build on anything older than Darwin8 expect to have to build a whole bunch of supporting tools first to support the bootstrap…

For the record, Darwin8 works fine for GCC11 - and I’d not expect a problem with GCC12 (so far) - there will come a point that we want to default to using embedded rpaths, which it doesn’t support so we shall see what options there are then.

Iain


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

end of thread, other threads:[~2021-09-13 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10  7:19 [PATCH] Remove DARWIN_PREFER_DWARF and dead code Richard Biener
2021-09-10 15:16 ` Jeff Law
2021-09-13 19:04   ` Iain Sandoe

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