diff options
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 18 |
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 |