diff options
author | Jack Howarth <howarth@bromo.med.uc.edu> | 2012-05-29 23:44:09 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2012-05-29 23:44:09 +0000 |
commit | 638c962f0a007ff2f59dc07b211a8c2579294e20 (patch) | |
tree | aa5b999c7d1d082b0e5c439e18b126cac9ddb7dc /gcc | |
parent | a8b4175ce40f6fd96d2b7ed3868f34b7a4a8a1cc (diff) | |
download | gcc-638c962f0a007ff2f59dc07b211a8c2579294e20.zip gcc-638c962f0a007ff2f59dc07b211a8c2579294e20.tar.gz gcc-638c962f0a007ff2f59dc07b211a8c2579294e20.tar.bz2 |
re PR debug/53453 (darwin linker expects both AT_name and AT_comp_dir debug notes)
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.
From-SVN: r187994
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/darwin.h | 2 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 4 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 2 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 2 | ||||
-rw-r--r-- | gcc/target.def | 7 |
6 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea8f7ec..68b37a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 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. + +2012-05-29 Jack Howarth <howarth@bromo.med.uc.edu> + * config/darwin.h (STARTFILE_SPEC): Do not use -lbundle1.o when Darwin >= 10. (DARWIN_DYLIB1_SPEC): Do not use -ldylib1.10.5.o when Darwin >= 10. diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 80ff0b0..5855778 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -416,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 diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index f7b2838..aeccc79 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -9493,6 +9493,10 @@ tables, and hence is desirable if it works. True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them. @end deftypevr +@deftypevr {Target Hook} bool TARGET_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. +@end deftypevr + @deftypevr {Target Hook} bool TARGET_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. @end deftypevr diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index a54b229..31dedad 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -9392,6 +9392,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 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b233d30..6085a94 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -22078,7 +22078,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) { diff --git a/gcc/target.def b/gcc/target.def index fd2bf8a..3463600 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -2749,6 +2749,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) |