]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
darwin.h (LINK_COMMAND_SPEC): Don't do dwarf stuff on pre-darwin9 system, unless...
authorMike Stump <mrs@apple.com>
Fri, 17 Nov 2006 06:48:01 +0000 (06:48 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Fri, 17 Nov 2006 06:48:01 +0000 (06:48 +0000)
* config/darwin.h (LINK_COMMAND_SPEC): Don't do dwarf stuff on
pre-darwin9 system, unless the user asks for it directly.
(PREFERRED_DEBUGGING_TYPE): Likewise.
* config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Likewise.
* config.gcc: Add suppport for darwin9.h.
* config/darwin9.h: Add.
* doc/install.texi (Specific): Clarify darwin documentation.

From-SVN: r118917

gcc/ChangeLog
gcc/config.gcc
gcc/config/darwin.h
gcc/config/darwin9.h [new file with mode: 0644]
gcc/config/i386/darwin.h
gcc/doc/install.texi

index 3f94517d32b9398ea13fd51da8d53e85cbd55f3c..8a74dde70bde04d5a3da50e0abc914c7f000b985 100644 (file)
@@ -1,3 +1,13 @@
+2006-11-16  Mike Stump  <mrs@apple.com>
+
+       * config/darwin.h (LINK_COMMAND_SPEC): Don't do dwarf stuff on
+       pre-darwin9 system, unless the user asks for it directly.
+       (PREFERRED_DEBUGGING_TYPE): Likewise.
+       * config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Likewise.
+       * config.gcc: Add suppport for darwin9.h.
+       * config/darwin9.h: Add.
+       * doc/install.texi (Specific): Clarify darwin documentation.
+       
 2006-11-16  Richard Earnshaw  <rearnsha@arm.com>
 
        * arm.h (CONSTANT_ALIGNMENT): Don't over-align strings when
index 6fd1a312d2285b987bbc3ffe0aef5e01ca4005eb..bdf280c9528908528d24c0422449ccf8c95230a9 100644 (file)
@@ -366,7 +366,13 @@ esac
 # Common parts for widely ported systems.
 case ${target} in
 *-*-darwin*)
-  tm_file="${tm_file} darwin.h ${cpu_type}/darwin.h"
+  tm_file="${tm_file} darwin.h"
+  case ${target} in
+  *-*-darwin9*)
+    tm_file="${tm_file} darwin9.h"
+    ;;
+  esac
+  tm_file="${tm_file} ${cpu_type}/darwin.h"
   tm_p_file="${tm_p_file} darwin-protos.h"
   tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
   target_gtfiles="\$(srcdir)/config/darwin.c"
index a518a2c7dc9d76445a6a3938e35431ec33850868..c0f9c86e4ec8a0bc83c0642dd0103312801cf908 100644 (file)
@@ -241,7 +241,7 @@ extern GTY(()) int darwin_ms_struct;
     %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}\n\
 %{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
     %{.c|.cc|.C|.cpp|.c++|.CPP|.m|.mm: \
-    %{g*:%{!gstabs*:%{!gnone: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
+    %{gdwarf-2:%{!gstabs*:%{!gnone: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
 
 #ifdef TARGET_SYSTEM_ROOT
 #define LINK_SYSROOT_SPEC \
@@ -395,9 +395,8 @@ extern GTY(()) int darwin_ms_struct;
 
 #define DBX_DEBUGGING_INFO 1
 
-/* Prefer DWARF2.  */
 #define DWARF2_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
 
 #define DEBUG_FRAME_SECTION    "__DWARF,__debug_frame,regular,debug"
 #define DEBUG_INFO_SECTION     "__DWARF,__debug_info,regular,debug"
diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h
new file mode 100644 (file)
index 0000000..ef9890a
--- /dev/null
@@ -0,0 +1,20 @@
+/* Prefer DWARF2.  */
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+#define DARWIN_PREFER_DWARF
+
+#undef LINK_COMMAND_SPEC
+#define LINK_COMMAND_SPEC "\
+%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+    %{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \
+    %l %X %{d} %{s} %{t} %{Z} \
+    %{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
+    %{o*}%{!o:-o a.out} \
+    %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
+    %{L*} %{fopenmp:%:include(libgomp.spec)%(link_gomp)}   \
+    %(link_libgcc) %o %{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
+    %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \
+    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}\n\
+%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
+    %{.c|.cc|.C|.cpp|.c++|.CPP|.m|.mm: \
+    %{g*:%{!gstabs*:%{!gnone: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}"
index 5f61a7c3e59f8f423a4496c885b2cd4dce8e8e3c..cf479439d838864b3ebf02f032181d19c7c466de 100644 (file)
@@ -187,6 +187,13 @@ extern void darwin_x86_file_end (void);
     SUBTARGET_C_COMMON_OVERRIDE_OPTIONS;                               \
   } while (0)
 
+/* Darwin on x86_64 uses dwarf-2 by default.  Pre-darwin9 32-bit
+   compiles defaut to stabs+.  darwin9+ defaults to dwarf-2.  */
+#ifndef DARWIN_PREFER_DWARF
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE (TARGET_64BIT ? DWARF2_DEBUG : DBX_DEBUG)
+#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.  */
index d7ff340956dd7ec544020ad14c7fe0f3601e7571..b135a520b048da5fd806d990e253853471f3ebe2 100644 (file)
@@ -3611,11 +3611,10 @@ binaries are available at
 @uref{http://developer.apple.com/darwin/projects/compiler/} (free
 registration required).
 
-This version of GCC requires at least cctools-590.7.
-
-The version of GCC shipped by Apple typically includes a number of
-extensions not available in a standard GCC release.  These extensions
-are generally for backwards compatibility and best avoided.
+This version of GCC requires at least cctools-590.36.  The
+cctools-590.36 package referenced from
+@uref{http://gcc.gnu.org/ml/gcc/2006-03/msg00507.html} will not work
+on systems older than 10.3.9 (aka darwin7.9.0).
 
 @html
 <hr />