On 10/02/2025 15:24, Tobias Burnus wrote:
Hi all,

Andrew and I discussed about the following:

Andrew Stubbs wrote:
This business of changing the -march flag from what the user specified is also questionable.

Result: the new patch (attached) no longer automatically chooses the associated ISA architecture but prints a fatal error instead, pointing to the associated generic ISA.

[This error is only printed if the generic multilib actually exists (and the specific does not).]

OK for mainline?

* * *

I assume that in the future, distros will build with gfx- generic{9,10-3,11} and gfx90{8,a} (MI100/MI200, not compatible with gfx9) – and this will likely also become the default in GCC.

However, for now the default is unchanged as LLVM 19 is still quite new – and, even more importantly, ROCm 6.3.2 does not support multilibs.

This is expected to change soon, given that the ROCR-Runtime git repo already implements it and traces of generic support already are in ROCm 6.3.2. (For instance, ROCm 6.3.2 can already decode the ELF flags of generic code objects.)

If, at some point in future, LLVM-LLD changes to permit linking generic libraries with specific-arch kernels, then this new error message should be replaced with a MULTILIB_MATCHES definition.

Until then, I think the proposed error message is better than the unexpected link error we have now.

+  fatal_error (UNKNOWN_LOCATION,
+              "GCC was build without library support for %<-march=%s%>; "
+              "consider compiling for the associated generic architecture "
+              "%<-march=%s%> instead", isa_name, gen_name);

s/build/built/

OK with that change, assuming you tested it carefully.

Andrew

Reply via email to