From 40681328ec3225bc99483bd31ff92971ed39bed1 Mon Sep 17 00:00:00 2001 From: fuowang <1106694860@qq.com> Date: Tue, 12 Apr 2022 11:33:40 +0800 Subject: [PATCH] Add loongarch64 support (#1614) * add loongarch64 support --- include/ZeroTierOne.h | 3 ++- make-linux.mk | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h index e16d23f87..2d103d847 100644 --- a/include/ZeroTierOne.h +++ b/include/ZeroTierOne.h @@ -1079,7 +1079,8 @@ enum ZT_Architecture ZT_ARCHITECTURE_DOTNET_CLR = 13, ZT_ARCHITECTURE_JAVA_JVM = 14, ZT_ARCHITECTURE_WEB = 15, - ZT_ARCHITECTURE_S390X = 16 + ZT_ARCHITECTURE_S390X = 16, + ZT_ARCHITECTURE_LOONGARCH64 = 17 }; /** diff --git a/make-linux.mk b/make-linux.mk index ab11cba10..49ada04bd 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -252,6 +252,10 @@ endif ifeq ($(CC_MACH),riscv64) ZT_ARCHITECTURE=0 endif +ifeq ($(CC_MACH),loongarch64) + ZT_ARCHITECTURE=17 + override DEFS+=-DZT_NO_TYPE_PUNNING +endif # Fail if system architecture could not be determined ifeq ($(ZT_ARCHITECTURE),999)