https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69821
Bug ID: 69821 Summary: -fdebug-prefix-map doesn't affect gcc command line switches in DWARF DW_AT_producer. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: hongxu.jia at windriver dot com Target Milestone: --- Hi all, I come from OpenEmbedded community (https://www.yoctoproject.org/), thanks the powerful gcc, it helps us to do lots of compiling staff. While cross compilation, we add '-g' to record debugging info, and lots of build path existed in debugging info. We do not want to expose the build path to others. So add '-fdebug-prefix-map=old=new' to replace the build path with target path. But the option '-fdebug-prefix-map=old=new' itself which included build path still exists in gcc command line switches in DWARF DW_AT_producer. I know we could use '-gno-record-gcc-switches' to not record all gcc command line switches in DWARF DW_AT_producer. But we would like to keep the others and only remove '-fdebug-prefix-map=old=new'. So I suggested to add a new option '-gno-record-debug-prefix-map' which don't record '-fdebug-prefix-map' in gcc command line switches in DWARF DW_AT_producer. Thanks Hongxu