https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101473
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Richard Biener from comment #9) > (In reply to Richard Biener from comment #8) > > (In reply to tonyb from comment #6) > > > The only thing I know is that roughly similar issues were handled with the > > > -fdebug-prefix-map=old=new switch, but I am not the expert. > > > > Yes, that works to strip the install location as well. So not a bug? > > But then -fdebug-prefix-map is applied after computing the CU checksum > and thus after producing the symbol that shows the difference with -flto. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 82783c4968b..07ea7c5af0c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7064,7 +7064,7 @@ attr_checksum (dw_attr_node *at, struct md5_ctx *ctx, int *mark) case dw_val_class_file: case dw_val_class_file_implicit: - CHECKSUM_STRING (AT_file (at)->filename); + CHECKSUM_STRING (remap_debug_filename (AT_file (at)->filename)); break; case dw_val_class_data8: might fix it (I wonder if we shouldn't simply remap once when we generate the locations rather than in dozen places...).