summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-18 15:15:39 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-18 15:15:39 +0000
commit5f1f2de5fe3f87b056e802102fcb975979845eff (patch)
tree2e4cb7ceb95c3ce97266450ff573e6d60f7ba70d /gcc/gcc.c
parent94fa71460651795c2bebcf39d3cc518255815c98 (diff)
downloadgcc-5f1f2de5fe3f87b056e802102fcb975979845eff.tar.gz
2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com> * Makefile.tpl (DEBUG_PREFIX_CFLAGS_FOR_TARGET): New. (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Include it. * Makefile.in: Regenerate. * configure.ac (--with-debug-prefix-map): New. * configure: Regenerate. config: 2007-08-18 Paul Brook <paul@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * mt-gnu (CXXFLAGS_FOR_TARGET): Add $(DEBUG_PREFIX_CFLAGS_FOR_TARGET). gcc: 2007-08-18 Paul Brook <paul@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * common.opt (-fdebug-prefix-map=): New option. * opts.c: Include debug.h. (common_handle_option): Handle -fdebug-prefix-map. * final.c: Include ggc.h. (struct debug_prefix_map, debug_prefix_maps, add_debug_prefix_map, remap_debug_filename): New. * Makefile.in (final.o, opts.o): Update dependencies. * debug.h (remap_debug_filename, add_debug_prefix_map): Declare. * configure.ac: Check for assembler --debug-prefix-map support. * configure, config.in: Regenerate. * gcc.c (ASM_MAP): Define conditional on HAVE_AS_DEBUG_PREFIX_MAP. (ASM_DEBUG_SPEC): Include ASM_MAP. * doc/install.texi (--with-debug-prefix-map): Document. * doc/invoke.texi (-fdebug-prefix-map): Document. * dbxout.c (dbxout_init, dbxout_start_source_file, dbxout_source_file): Call remap_debug_filename. * dwarf2out.c (add_comp_dir_attribute, maybe_emit_file, dwarf2out_start_source_file, dwarf2out_finish): Call remap_debug_filename. (file_table_relative_p): Do not check d->emitted_number. * toplev.c (output_file_directive): Call remap_debug_filename. * vmsdbgout.c (write_srccorr): Call remap_debug_filename. * xcoffout.c (xcoffout_source_file): Call remap_debug_filename. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127613 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 02c365b4b5c..9546ff9c703 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -655,21 +655,27 @@ proper position among the other output files. */
#define LINKER_NAME "collect2"
#endif
+#ifdef HAVE_AS_DEBUG_PREFIX_MAP
+#define ASM_MAP " %{fdebug-prefix-map=*:--debug-prefix-map %*}"
+#else
+#define ASM_MAP ""
+#endif
+
/* Define ASM_DEBUG_SPEC to be a spec suitable for translating '-g'
to the assembler. */
#ifndef ASM_DEBUG_SPEC
# if defined(DBX_DEBUGGING_INFO) && defined(DWARF2_DEBUGGING_INFO) \
&& defined(HAVE_AS_GDWARF2_DEBUG_FLAG) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
-# define ASM_DEBUG_SPEC \
- (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG \
- ? "%{gdwarf-2*:--gdwarf2}%{!gdwarf-2*:%{g*:--gstabs}}" \
- : "%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}")
+# define ASM_DEBUG_SPEC \
+ (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG \
+ ? "%{gdwarf-2*:--gdwarf2}%{!gdwarf-2*:%{g*:--gstabs}}" ASM_MAP \
+ : "%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}" ASM_MAP)
# else
# if defined(DBX_DEBUGGING_INFO) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
-# define ASM_DEBUG_SPEC "%{g*:--gstabs}"
+# define ASM_DEBUG_SPEC "%{g*:--gstabs}" ASM_MAP
# endif
# if defined(DWARF2_DEBUGGING_INFO) && defined(HAVE_AS_GDWARF2_DEBUG_FLAG)
-# define ASM_DEBUG_SPEC "%{g*:--gdwarf2}"
+# define ASM_DEBUG_SPEC "%{g*:--gdwarf2}" ASM_MAP
# endif
# endif
#endif