diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-29 23:44:09 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-29 23:44:09 +0000 |
commit | effa044f391b804c076699ef249af660ff9e0f81 (patch) | |
tree | aa5b999c7d1d082b0e5c439e18b126cac9ddb7dc | |
parent | 41f5b5b0ccdf6908007a2f6b6ffae9a555b44b18 (diff) | |
download | gcc-effa044f391b804c076699ef249af660ff9e0f81.tar.gz |
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/trunk@187994 138bc75d-0d04-0410-961f-82ee72b054a4
-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 ea8f7ec0a79..68b37a07bf9 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 80ff0b060b7..5855778109d 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 f7b2838efd8..aeccc79f39f 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 a54b2298f4b..31dedad8a22 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 b233d30ce46..6085a947541 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 fd2bf8a7e33..3463600f99a 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) |