Skip to contentSkip to conversation

enosys: add support for LoongArch

PATCH In review Enze Li 2 participants 2 messages May 23, 2023 Util-Linux package

lore
Share & tools
lore

Enze Li

author
#0 lore raw

PATCH 1/1 enosys: add support for LoongArch

---
 misc-utils/enosys.c | 6 ++++++
 1 file changed, 6 insertions(+)
misc-utils/enosys.c +6 -0
index 02978c20a..9facbcb53 100644
@@ -70,6 +70,12 @@
 #    else
 # 	 define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2
 #    endif
+#elif __loongarch__
+#    if _LOONGARCH_SZPTR == 32
+# 	 define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH32
+#    elif _LOONGARCH_SZPTR == 64
+# 	 define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH64
+#    endif
 #else
 #    error Unknown target architecture
 #endif

base-commit: fe0b1e793c9017edba72768e2e0b4c769c204604

Signature · 1 line
2.34.1
maintainer
#1 lore raw

Please, see https://github.com/util-linux/util-linux/pull/2260, Thomas wants to move all this to include/audit-arch.h

Karel

Quoted 27 lines · Enze Li
---
 misc-utils/enosys.c | 6 ++++++
 1 file changed, 6 insertions(+)
misc-utils/enosys.c +6 -0
index 02978c20a..9facbcb53 100644
@@ -70,6 +70,12 @@
 #    else
 # 	 define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2
 #    endif
+#elif __loongarch__
+#    if _LOONGARCH_SZPTR == 32
+# 	 define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH32
+#    elif _LOONGARCH_SZPTR == 64
+# 	 define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH64
+#    endif
 #else
 #    error Unknown target architecture
 #endif

base-commit: fe0b1e793c9017edba72768e2e0b4c769c204604

Signature · 1 line
2.34.1
Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com