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

            Bug ID: 99973
           Summary: -gsplit-dwarf uses host objcopy for cross compilers
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---

ASM_FINAL_SPEC has:

  "%{gsplit-dwarf: \n\
       objcopy --extract-dwo \
         %{c:%{o*:%*}%{!o*:%w%b%O}}%{!c:%U%O} \
         %b.dwo \n\
       objcopy --strip-dwo \
         %{c:%{o*:%*}%{!o*:%w%b%O}}%{!c:%U%O} \
    }"

which hard-codes the assumption that a command called “objcopy”
will work for the target.  This is true for native compilers but
isn't usually true for cross compilers.

This is causing:

FAIL: gcc.dg/lto/pr83719 c_lto_pr83719_0.o assemble,  -flto -g -gsplit-dwarf

Reply via email to