https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66594
--- Comment #6 from David Malcolm <dmalcolm at gcc dot gnu.org> --- (In reply to ktkachov from comment #4) > (In reply to David Malcolm from comment #2) > > (In reply to Andrew Pinski from comment #1) > > > This should be true on all targets which have -mcpu=native (or > > > -march=native). Note x86 options are not always the same on x86 vs arm vs > > > aarch64 vs ppc. > > > > Thanks. > > > > Is there a way to express > > "give me the most specialized possible code for the current host"? > > in a manner that's consistent across all supported hosts? > > (e.g. in the "specs" language?) > > > > e.g. "-march=native -mcpu=native -mtune=native" > > A note that the meaning of march/mcpu/mtune may differ among targets. > For arm and aarch64, for example, the preferred option is -mcpu, which is > the combination of march+mtune Perhaps we need a target macro that's something like: TARGET_JIT_NATIVE_CODE_SPEC or somesuch, defaulting to empty, but defining it per-arch to a spec-language string containing the appropriate option(s) for that host/target? (assuming host==target, which is currently the case for the jit).