Browse Source

arch/loongarch: add lsx/lasx SIMD dependency on fpu64

Since the LoongArch64 introduction in commit [1], the Kconfig menus
allows selecting lsx and lasx SIMD options independently of the FPU
configuration.

When lsx or lasx SIMD is selected and FPU is "none", host-gcc-initial
is failing at configuration time, with error:

    --with-simd=lasx conflicts with --with-fpu=none

According to the gcc configuration script [2], lsx and lasx values
are valid only if FPU is 64.

This commit adds the missing "depends on BR2_LOONGARCH_FPU_64" for
BR2_LOONGARCH_SIMD_LSX and BR2_LOONGARCH_SIMD_LASX options.

Fixes:
https://autobuild.buildroot.org/results/d159645dab9206dd46f45e79241fc8a950bd0326/

[1] https://gitlab.com/buildroot.org/buildroot/-/commit/54895db9c10a26283b25a393cb6c872d72c245d1
[2] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config.gcc;h=a6f6efec4e103301225ef74c2d1159933d1c9cf8;hb=1757c320badc92c0628eafcd07d54585659692ed#l5163

Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Julien Olivain 4 weeks ago
parent
commit
279cd77865
1 changed files with 2 additions and 0 deletions
  1. 2 0
      arch/Config.in.loongarch

+ 2 - 0
arch/Config.in.loongarch

@@ -59,12 +59,14 @@ config BR2_LOONGARCH_SIMD_NONE
 
 config BR2_LOONGARCH_SIMD_LSX
 	bool "LSX"
+	depends on BR2_LOONGARCH_FPU_64
 	help
 	  Enable generating instructions from the 128-bit LoongArch SIMD
 	  Extension (LSX).
 
 config BR2_LOONGARCH_SIMD_LASX
 	bool "LASX"
+	depends on BR2_LOONGARCH_FPU_64
 	help
 	  Enable generating instructions from the 256-bit LoongArch
 	  Advanced SIMD Extension (LASX) and the 128-bit LoongArch