diff --git a/0004-add-loongarch64-macro-define.patch b/0004-add-loongarch64-macro-define.patch new file mode 100644 index 0000000000000000000000000000000000000000..529c595f6ea51f680e46b93aa89825ed42ae7b09 --- /dev/null +++ b/0004-add-loongarch64-macro-define.patch @@ -0,0 +1,49 @@ +From 2c0d07886e829c185e1dc15ec8f0a48ce14bd702 Mon Sep 17 00:00:00 2001 +From: zhaojiale +Date: Wed, 15 May 2024 18:12:25 +0800 +Subject: [PATCH] add loongarch64 macro define + +Signed-off-by: zhaojiale +--- + src/util/detect_arch.h | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +diff --git a/src/util/detect_arch.h b/src/util/detect_arch.h +index 75fa7ed..048bdd7 100644 +--- a/src/util/detect_arch.h ++++ b/src/util/detect_arch.h +@@ -94,7 +94,13 @@ + #endif + + #if defined(__mips__) +-#define DETECT_ARCH_HPPA 1 ++#define DETECT_ARCH_MIPS 1 ++#endif ++ ++#if defined(__loongarch_lp64) || defined(__loongarch64) ++#define DETECT_ARCH_LOONGARCH64 1 ++#elif defined(__loongarch__) ++#define DETECT_ARCH_LOONGARCH 1 + #endif + + #if defined(__riscv) +@@ -145,7 +151,15 @@ + #endif + + #ifndef DETECT_ARCH_MIPS +-#define DETECT_ARCH_HPPA 0 ++#define DETECT_ARCH_MIPS 0 ++#endif ++ ++#ifndef DETECT_ARCH_LOONGARCH ++#define DETECT_ARCH_LOONGARCH 0 ++#endif ++ ++#ifndef DETECT_ARCH_LOONGARCH64 ++#define DETECT_ARCH_LOONGARCH64 0 + #endif + + #ifndef DETECT_ARCH_RISCV +-- +2.43.0 + diff --git a/mesa.spec b/mesa.spec index e4972be3dea42e100080bbdd6b4a2dbd15e241ac..8676c8ef3b6a0c175795d3db4e0b73500e639e11 100644 --- a/mesa.spec +++ b/mesa.spec @@ -1,4 +1,4 @@ -%define anolis_release 4 +%define anolis_release 5 %global with_hardware 1 %global with_vulkan_hw 1 @@ -52,6 +52,7 @@ Patch13: 0002-26018_upstream_orcjit_patch_update.patch Patch14: 0001-add_loongarch64_basic_support.patch Patch15: 0002-llvmpipe-support-loongarch64-orcjit.patch Patch16: 0003-llvmpipe-remove-useless-code.patch +Patch17: 0004-add-loongarch64-macro-define.patch BuildRequires: meson BuildRequires: gcc @@ -640,6 +641,9 @@ popd %endif %changelog +* Wed May 15 2024 Jiale Zhao - 23.3.0-5 +- Add loongarch64 macro define + * Mon May 13 2024 Jiale Zhao - 23.3.0-4 - Remove useless code