diff mbox series

doc: RISC-V: Document that -mcpu doesn't override -march or -mtune

Message ID 20240220154537.3830-2-palmer@rivosinc.com
State New
Headers show
Series doc: RISC-V: Document that -mcpu doesn't override -march or -mtune | expand

Commit Message

Palmer Dabbelt Feb. 20, 2024, 3:45 p.m. UTC
This came up recently as Edwin was looking through the test suite.  A
few of us were talking about this during the patchwork meeting and were
surprised.  Looks like this is the desired behavior, so let's at least
document it.

gcc/ChangeLog:

	* doc/invoke.texi: Document -mcpu.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
 gcc/doc/invoke.texi | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kito Cheng Feb. 23, 2024, 4:27 a.m. UTC | #1
LGTM, and committed :)

On Tue, Feb 20, 2024 at 11:46 PM Palmer Dabbelt <palmer@rivosinc.com> wrote:
>
> This came up recently as Edwin was looking through the test suite.  A
> few of us were talking about this during the patchwork meeting and were
> surprised.  Looks like this is the desired behavior, so let's at least
> document it.
>
> gcc/ChangeLog:
>
>         * doc/invoke.texi: Document -mcpu.
>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> ---
>  gcc/doc/invoke.texi | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 6ec56493e59..4a4bba9f1cd 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -30670,6 +30670,8 @@ Permissible values for this option are: @samp{sifive-e20}, @samp{sifive-e21},
>  @samp{sifive-s21}, @samp{sifive-s51}, @samp{sifive-s54}, @samp{sifive-s76},
>  @samp{sifive-u54}, @samp{sifive-u74}, and @samp{sifive-x280}.
>
> +Note that @option{-mcpu} does not override @option{-march} or @option{-mtune}.
> +
>  @opindex mtune
>  @item -mtune=@var{processor-string}
>  Optimize the output for the given processor, specified by microarchitecture or
> --
> 2.43.0
>
diff mbox series

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6ec56493e59..4a4bba9f1cd 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -30670,6 +30670,8 @@  Permissible values for this option are: @samp{sifive-e20}, @samp{sifive-e21},
 @samp{sifive-s21}, @samp{sifive-s51}, @samp{sifive-s54}, @samp{sifive-s76},
 @samp{sifive-u54}, @samp{sifive-u74}, and @samp{sifive-x280}.
 
+Note that @option{-mcpu} does not override @option{-march} or @option{-mtune}.
+
 @opindex mtune
 @item -mtune=@var{processor-string}
 Optimize the output for the given processor, specified by microarchitecture or