On 2021-03-14 12:55, Jeffrey Walton wrote:
The underlying problem is GCC, Clang and friends conflate the user's
ISA with ISA the compiler uses. They are not the same - they are
distinct. Unfortunately, GCC and Clang never addressed the underlying
problem.
Sorry, what does that mean?
GCC works fine as a cross-compiler. E.g. built to run on the x86_64 ISA,
but putting out Aarch64 code.
The "Submodel" options of GCC are determined by the configuration: how
that GCC was built.
On x86 9and maybe others), there is a "native" argument for -march and
-mtune as in -march=native.
If GCC is configured that way, it will generate code according to the
processor of the machine it is running on. (Unless, I'm guessing, it's
built as a cross-compiler, so the build machine's architecture is
irrelevant.)