public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] enable omit-frame-pointer on darwin with dwarf2
@ 2010-08-13 10:02 Jack Howarth
  2010-08-13 12:33 ` Mike Stump
  2010-08-13 16:02 ` H.J. Lu
  0 siblings, 2 replies; 6+ messages in thread
From: Jack Howarth @ 2010-08-13 10:02 UTC (permalink / raw)
  To: gcc-patches; +Cc: mikestump, iains

The attached patch enables -fomit-frame-pointer for those darwin
releases which support dwarf2. Bootstrapped and regression tested
on x86_64-apple-darwin10. Okay for gcc trunk?
                 Jack

2010-08-12  Jack Howarth <howarth@bromo.med.uc.edu>

	* gcc/configure.ac: Enable -fomit-frame-pointer on darwin
	which support dwarf2.
	* config/i386/i386.c (override_options): Same.


Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 163214)
+++ gcc/configure.ac	(working copy)
@@ -1584,7 +1584,7 @@
 [  --enable-frame-pointer  enable -fno-omit-frame-pointer by default for 32bit x86], [],
 [
 case $target_os in
-linux*)
+linux* | darwin[[8912]]*)
   # Enable -fomit-frame-pointer by default for Linux.
   enable_frame_pointer=no
   ;;
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 163214)
+++ gcc/config/i386/i386.c	(working copy)
@@ -3276,9 +3276,8 @@
     {
       if (flag_zee == 2)
         flag_zee = 1;
-      /* Mach-O doesn't support omitting the frame pointer for now.  */
       if (flag_omit_frame_pointer == 2)
-	flag_omit_frame_pointer = (TARGET_MACHO ? 0 : 1);
+	flag_omit_frame_pointer = 1;
       if (flag_asynchronous_unwind_tables == 2)
 	flag_asynchronous_unwind_tables = 1;
       if (flag_pcc_struct_return == 2)
@@ -3288,10 +3287,8 @@
     {
       if (flag_zee == 2)
         flag_zee = 0;
-      /* Mach-O doesn't support omitting the frame pointer for now.  */
       if (flag_omit_frame_pointer == 2)
-	flag_omit_frame_pointer =
-	  (TARGET_MACHO ? 0 : !(USE_IX86_FRAME_POINTER || optimize_size));
+	flag_omit_frame_pointer = !(USE_IX86_FRAME_POINTER || optimize_size);
       if (flag_asynchronous_unwind_tables == 2)
 	flag_asynchronous_unwind_tables = !USE_IX86_FRAME_POINTER;
       if (flag_pcc_struct_return == 2)

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

end of thread, other threads:[~2010-08-13 17:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-13 10:02 [PATCH] enable omit-frame-pointer on darwin with dwarf2 Jack Howarth
2010-08-13 12:33 ` Mike Stump
2010-08-13 16:02 ` H.J. Lu
2010-08-13 16:09   ` Jack Howarth
2010-08-13 17:22     ` H.J. Lu
2010-08-13 18:55   ` Mike Stump

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