Richard Biener wrote:
I'll follow up with the libgomp testing test summary for archival
purposes.  I still see linker errors for testcases using -g
(the ld: ^[[0;31merror: ^[[0mincompatible mach:
/tmp/ccr0oDpD.mkoffload.dbg.o^M kind)

Hmm, odd – can you try compile with -save-temp and look at the relevant files with, e.g., readelf -h on the GCN files (e.g. 'readelf -h *.xamdgcn-amdhsa.mkoffload.*o') – that should show under "Flags" what the program was compiled for.

We did encounter this issue with LLVM 18 and the solution was explicitly set the version both in the compiler via gcc/config/gcn/gcn-hsa.h's

#define ABI_VERSION_SPEC "march=fiji:--amdhsa-code-object-version=3;" \
                         "!march=*|march=*:--amdhsa-code-object-version=4"

and for the debugging data in mkoffload.cc's

  ehdr.e_ident[8] = (elf_arch == EF_AMDGPU_MACH_AMDGCN_GFX803
                     ? ELFABIVERSION_AMDGPU_HSA_V3
                     : ELFABIVERSION_AMDGPU_HSA_V4);

But I fail to see why this doesn't work for you - you should get V4 for your gfx1036 target.

Here, ELFABIVERSION_AMDGPU_HSA_V4 2 (V1 did not have a number and V2 started with 0, hence V3 = 1 etc.)

What LLVM version did you use for the assembler (llvm-mc)?

Tobias

Reply via email to