On 29/01/2020 12:53, Tobias Burnus wrote:
Cf. PR93409 comments 4 and later. The comments 1–3 of the PR are covered by patch https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01663.html (skip building libgomp's HSA/GCN plugin with -mx32).

For AMDGCN, the LLVM assembler is used. While for LLVM 7+8, GCC generates code which is the same as LLVM, for LLVM 9 (and later), the LLVM switched from Code Object V2 to V3.

With LLVM 9, the old variant is only accepted when also passing "-mattr=-code-object-v3" to the compiler; that's a"-" after the "=" to disable V3. (Cf. also https://sources.debian.org/src/gcc-10/10-20200117-2/debian/patches/gcc-amdgcn-fix.diff/).

My initial idea was to add a configure check – which I also include as attachment. However, it turned out that at last the assembler of LLVM version 7.0.1 already supports this flag. Hence, we can go for the simpler solution and use the assembler flag unconditionally.

OK for the trunk?

What testing have you done?

I've been holding off submitting what is essentially this patch myself until I can run a full test with LLVM 8/9. It just hasn't got to the top of my list to set that up yet.

It looks right, of course, but I don't want to just assume so.

Andrew

Reply via email to