Commit 638c962f by Jack Howarth Committed by Mike Stump

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
parent a8b4175c
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.
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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)
{
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment