https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121788

            Bug ID: 121788
           Summary: asm_debug spec mis-ordering --debug-prefix-map options
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jbeulich at suse dot com
  Target Milestone: ---

In the compiler, all -f*-prefix-map options are processed in the order
specified on the command line (with, when use later, last one being checked
first), where -ffile-prefix-map= implies -fdebug-prefix-map= (inserted
correctly at the respective position). Similar logic exists in the assembler.
However, with

#define ASM_MAP " %{ffile-prefix-map=*:--debug-prefix-map %*}
%{fdebug-prefix-map=*:--debug-prefix-map %*}"

all -ffile-prefix-map= options will have corresponding --debug-prefix-map
options emitted to the assembler command line before any of those for the
-fdebug-prefix-map= ones, potentially breaking intended ordering when a mix of
options is used for translating assembly files.

Reply via email to