> When testing a extension, it is often necessary for a certain program not to
> need some kind of extension, such as the bitmanip extension, to evaluate the
> performance or codesize of the extension. However, the current multilib rules
> will report an error when it is not a superset of the MULTILIB_REQUIRED list,
> which will cause the program to be unable to link normally, thus failing to
> achieve the expected purpose.
>
> Therefore, the compilation option is added to avoid riscv_multi_lib_check()
> interruption of compilation.

I think it's dangerous to remove the check, but I can understand there
are some cases where we really do not want the `security lock`,
so I am OK with introducing a new option to disable that.
but plz add documentation to the option into gcc/doc/invoke.texi
and mention it will just use default multilib and MIGHT not be correct
in some cases.

> --- a/gcc/config/riscv/riscv.opt
> +++ b/gcc/config/riscv/riscv.opt
> @@ -295,3 +295,7 @@ Enum(riscv_autovec_lmul) String(m8) Value(RVV_M8)
>  -param=riscv-autovec-lmul=
>  Target RejectNegative Joined Enum(riscv_autovec_lmul) 
> Var(riscv_autovec_lmul) Init(RVV_M1)
>  -param=riscv-autovec-lmul=<string>     Set the RVV LMUL of 
> auto-vectorization in the RISC-V port.
> +
> +mdisable-multilib-check

I would like to rename that to mno-multilib-check since that is more
like all other gcc option conventions.

> +Target Bool Var(riscv_disable_multilib_check) Init(0)

You don't need Var(riscv_disable_multilib_check) and Init(0) since no
one check the value
And you need RejectNegative to prevent gcc accept -mno-disable-multilib-check

> +Disable multilib checking by riscv_multi_lib_check().

`riscv_multi_lib_check()` is meanless for users since it's
implementation detail.
`Disable multilib checking; use the default multilib if a compatible
one is not found.`

Reply via email to