OSDN Git Service

2013-04-16 Jack Howarth <howarth@bromo.med.uc.edu>
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Apr 2013 17:09:14 +0000 (17:09 +0000)
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Apr 2013 17:09:14 +0000 (17:09 +0000)
Backport from mainline
2012-05-29  Jack Howarth  <howarth@bromo.med.uc.edu>
* config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o
on Darwin >= 12.
(DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10 and < 12.

2012-05-29  Jack Howarth  <howarth@bromo.med.uc.edu>
PR debug/53453
* doc/tm.texi: Update.
* doc/tm.texi.in (SDB and DWARF) <TARGET_FORCE_AT_COMP_DIR>: Add @hook.
* target.def (force_at_comp_dir): New hook.
* config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define.
* dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@198005 138bc75d-0d04-0410-961f-82ee72b054a4

ChangeLog
gcc/config/darwin.h
gcc/doc/tm.texi.in
gcc/dwarf2out.c
gcc/target.def

index 7d255b3..0b3489b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2013-04-16  Jack Howarth  <howarth@bromo.med.uc.edu>
+
+       Backport from mainline
+       2012-05-29  Jack Howarth  <howarth@bromo.med.uc.edu>
+       * config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o
+       on Darwin >= 12.
+       (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10 and < 12.
+
+
+       2012-05-29  Jack Howarth  <howarth@bromo.med.uc.edu>
+       PR debug/53453
+       * doc/tm.texi: Update.
+       * doc/tm.texi.in (SDB and DWARF) <TARGET_FORCE_AT_COMP_DIR>: Add @hook.
+       * target.def (force_at_comp_dir): New hook.
+       * config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define.
+       * dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir.
+
 2013-04-11  Release Manager
 
        * GCC 4.7.3 released.
index 3e6efd7..5855778 100644 (file)
@@ -356,7 +356,9 @@ extern GTY(()) int darwin_ms_struct;
      %{!Zbundle:%{pg:%{static:-lgcrt0.o}                                   \
                      %{!static:%{object:-lgcrt0.o}                         \
                                %{!object:%{preload:-lgcrt0.o}              \
-                                 %{!preload:-lgcrt1.o %(darwin_crt2)}}}}    \
+                                 %{!preload:-lgcrt1.o                       \
+                                 %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \
+                                 %(darwin_crt2)}}}}    \
                 %{!pg:%{static:-lcrt0.o}                                   \
                       %{!static:%{object:-lcrt0.o}                         \
                                 %{!object:%{preload:-lcrt0.o}              \
@@ -379,7 +381,7 @@ extern GTY(()) int darwin_ms_struct;
 #define DARWIN_CRT1_SPEC                                               \
   "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o)            \
    %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o)  \
-   %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o)       \
+   %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o)  \
    %{fgnu-tm: -lcrttms.o}"
 
 /* Default Darwin ASM_SPEC, very simple.  */
@@ -414,6 +416,8 @@ extern GTY(()) int darwin_ms_struct;
 
 #define TARGET_WANT_DEBUG_PUB_SECTIONS true
 
+#define TARGET_FORCE_AT_COMP_DIR true
+
 /* When generating stabs debugging, use N_BINCL entries.  */
 
 #define DBX_USE_BINCL
index 0e4856f..afb3e44 100644 (file)
@@ -9388,6 +9388,8 @@ tables, and hence is desirable if it works.
 
 @hook TARGET_WANT_DEBUG_PUB_SECTIONS
 
+@hook TARGET_FORCE_AT_COMP_DIR
+
 @hook TARGET_DELAY_SCHED2
 
 @hook TARGET_DELAY_VARTRACK
index 4ac66f9..b99e45b 100644 (file)
@@ -22538,7 +22538,7 @@ dwarf2out_finish (const char *filename)
   /* Add the name for the main input file now.  We delayed this from
      dwarf2out_init to avoid complications with PCH.  */
   add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
-  if (!IS_ABSOLUTE_PATH (filename))
+  if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir)
     add_comp_dir_attribute (comp_unit_die ());
   else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
     {
index fd107fb..338c531 100644 (file)
@@ -2758,6 +2758,13 @@ DEFHOOKPOD
  bool, false)
 
 DEFHOOKPOD
+(force_at_comp_dir,
+ "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \
+ compilation unit.  This attribute is required for the darwin linker \
+ to emit debug information.",
+ bool, false)
+
+DEFHOOKPOD
 (delay_sched2, "True if sched2 is not to be run at its normal place.  \
 This usually means it will be run as part of machine-specific reorg.",
 bool, false)