On 16/07/2020 16:06, Andrew Stubbs wrote:
This patch adds debug support to mkoffload, similar to what happens in
lto-wrapper.
Unlike lto-wrapper, we must deal with mismatched architectures and
mismatched program scope. These are fixed up using manual ELF patching
because there's no useful support in simple_object (yet). Should this be
something that other offload targets want to do then that probably ought
to be changed in future, but it isn't necessary yet.
This is enough to prevent rocgdb choking on malformed debug information
and debug simple offload testcases; it may be that further adjustment is
needed.
I have not attempted to make similar changes to the other instance of
mkoffload as nvptx has no use for debug info.
This patch is now backported to devel/omp/gcc-10.
Andrew