https://gcc.gnu.org/g:a2cb656c0d1f0b493219025208fa8ed5c7abd2cb
commit r15-2128-ga2cb656c0d1f0b493219025208fa8ed5c7abd2cb Author: Kyrylo Tkachov <ktkac...@nvidia.com> Date: Tue Jul 16 16:59:42 2024 +0530 [aarch64] Document rewriting of -march=native to -mcpu=native Commit dd9e5f4db2debf1429feab7f785962ccef6e0dbd changed -march=native to treat it as -mcpu=native if no other mcpu or mtune option was given. It would make sense to document this, especially if we try to persuade compilers like LLVM to take the same approach. This patch documents that behaviour. Bootstrapped and tested on aarch64-none-linux-gnu. Signed-off-by: Kyrylo Tkachov <ktkac...@nvidia.com> gcc/ChangeLog: * doc/invoke.texi (AArch64 Options): Document rewriting of -march=native to -mcpu=native. Diff: --- gcc/doc/invoke.texi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 403ea9da1abd..f052128e2a5d 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -21498,7 +21498,10 @@ and the features that they enable by default: The value @samp{native} is available on native AArch64 GNU/Linux and causes the compiler to pick the architecture of the host system. This option has no effect if the compiler is unable to recognize the -architecture of the host system, +architecture of the host system. When @option{-march=native} is given and +no other @option{-mcpu} or @option{-mtune} is given then GCC will pick +the host CPU as the CPU to tune for as well as select the architecture features +from. That is, @option{-march=native} is treated as @option{-mcpu=native}. The permissible values for @var{feature} are listed in the sub-section on @ref{aarch64-feature-modifiers,,@option{-march} and @option{-mcpu}