On 12/18/25 11:50, Xi Ruoyao wrote:
Someone (via a WeChat group) reported that --with-arch=la464 --with-tune=la664 had stopped to work after commiting the LA32 support.
Grammar nit: "stopped working after the LA32 support was merged". The "after committing" part is especially confusing because the implied actor would be "someone" i.e. the reporter.
While this can be treated as a simple logic error (i.e. we may simply change "loongarch64" in the case statement to an asterisk), IMO we should just relax the check: at runtime the "unreasonable" combinations like "-march=la64v1.0 -mtune=loongarch32" or "-march=la664 -mtune=la464" is allowed (and the second case has been allowed for a long time), and a combination of --with-arch=A --with-tune=T should be allowed if -march=A -mtune=T is allowed at runtime. Also if we consider the fact that --with-tune= and -mtune= only select a set of heruistic parameters, such combinations may be not so
typo: "heuristic"
unreasonable. gcc/ * config.gcc: Relax the check for LoongArch with_tune. --- Ok for trunk? gcc/config.gcc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 836cdff6317..1f9d105c732 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -5325,14 +5325,7 @@ case "${target}" in# Check default with_tune configuration using with_arch.- case ${with_arch} in - la32v1.0 | la32rv1.0) - tune_pattern="loongarch32" - ;; - loongarch64) - tune_pattern="native|generic|loongarch64|la[46]64" - ;; - esac + tune_pattern="native|generic|loongarch64|la[46]64|loongarch32"case ${with_tune} in"") ;; # OK
LGTM, thanks! Reviewed-by: WANG Xuerui <[email protected]> -- Regards, WANG "xen0n" Xuerui Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/ Unofficial Loongson OSS community: https://github.com/loongson-community
