On Sat, 2022-07-02 at 15:39 +0800, Lulu Cheng wrote:

> diff --git a/gcc/common/config/loongarch/loongarch-common.cc 
> b/gcc/common/config/loongarch/loongarch-common.cc
> index b6cbd84b873..f8b4660fabf 100644
> --- a/gcc/common/config/loongarch/loongarch-common.cc
> +++ b/gcc/common/config/loongarch/loongarch-common.cc
> @@ -38,7 +38,4 @@ static const struct default_options 
> loongarch_option_optimization_table[] =
>     { OPT_LEVELS_NONE, 0, NULL, 0 }
>   };
> 
> -#undef TARGET_DEFAULT_TARGET_FLAGS
> -#define TARGET_DEFAULT_TARGET_FLAGS    MASK_CHECK_ZERO_DIV
> -
> 
> I think this modifications are needed, and there is no problem with the 
> rest.

Yes, this hook is unneeded now.  Though the removal is not strictly
needed, it's good to remove irrelevant code (CWE-1164 says we shouldn't
keep any irrelevant code).

I'll commit the patch with the hook removed after another regtest on
loongarch64-linux-gnu.  I just rebuilt the entire system on my 3A5000,
so I need some time to set it up.  Expectation time to commit is today
evening or tomorrow morning.

BTW I've included this patch building my system, no bad things has
happened so far.

Reply via email to