https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93409
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Matthias Klose from comment #7) > /home/packages/gcc/10/gcc-10-10-20200128/build-gcn/./gcc/xgcc […] > -isystem /home/packages/gcc/10/gcc-10-10-20200128/src-gcn/newlib/libc/include This looks as if you are currently compiling the compiler targetting GCN – > /tmp/ccCyZnW0.s:2:2: error: unknown directive > .hsa_code_object_version 2,0 And this is valid for the GCN/HSA assembler, the assembler should know this directive ; I wonder whether the code is run by the wrong assembler? ("llvm-9 as the linker/assembler") In principle, this code should be handled by LLVM, cf. for LLVM 7 (identical for 8): https://releases.llvm.org/7.0.0/docs/AMDGPUUsage.html#hsa-code-object-version-major-minor and the current version (identical to LLVM 9): https://llvm.org/docs/AMDGPUUsage.html#code-object-v2-directives-mattr-code-object-v3 However, while LLVM 7+8 simply list .hsa_code_object_version, LLVM 9 and current have it under a section "Code Object V2 (-mattr=-code-object-v3)", stating that Code Object V2 is not the default emitted by LLVM. [V3 uses -mattr=+code-object-v3, note the "+" after the "=".] I am not sure in how far this affects assembly rather than LLVM assembly generation, but you could try to pass "-Wa,-mattr=-code-object-v3" to GCC, e.g. by adding it to the CFLAGS.