From 1ba3e83958e15c8c3de7e02e87540a41801195d5 Mon Sep 17 00:00:00 2001 From: Sui Jingfeng Date: Wed, 8 Feb 2023 09:36:24 +0800 Subject: meson: add basic support for loongarch Acked-by: Erik Faye-Lund Signed-off-by: Sui Jingfeng Part-of: --- meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 91a7fb8669e..621f0675489 100644 --- a/meson.build +++ b/meson.build @@ -154,6 +154,10 @@ if gallium_drivers.contains('auto') gallium_drivers = [ 'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'swrast' ] + elif ['loongarch64'].contains(host_machine.cpu_family()) + gallium_drivers = [ + 'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'etnaviv', 'swrast' + ] else error('Unknown architecture @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format( host_machine.cpu_family())) @@ -218,6 +222,8 @@ if _vulkan_drivers.contains('auto') _vulkan_drivers = ['swrast'] elif ['mips', 'mips64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family()) _vulkan_drivers = ['amd', 'swrast'] + elif ['loongarch64'].contains(host_machine.cpu_family()) + _vulkan_drivers = ['amd', 'swrast'] else error('Unknown architecture @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format( host_machine.cpu_family())) @@ -1241,6 +1247,11 @@ elif host_machine.cpu_family() == 'mips64' and host_machine.endian() == 'little' with_asm_arch = 'mips64el' pre_args += ['-DUSE_MIPS64EL_ASM'] endif +elif host_machine.cpu_family() == 'loongarch64' + if system_has_kms_drm + with_asm_arch = 'loongarch64' + pre_args += ['-DUSE_LOONGARCH64_ASM'] + endif endif # Check for standard headers and functions -- cgit v1.2.3