Skip to content

Commit

Permalink
Add support for LoongArch.
Browse files Browse the repository at this point in the history
Signed-off-by: liuxiang <liuxiang@loongson.cn>
  • Loading branch information
liuxiang88 committed Aug 9, 2023
1 parent 415132c commit 1de6886
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions patches/fitsio2.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- cfitsio-4.2.0/fitsio2.h 2023-08-09 10:23:45.508392645 +0800
+++ cfitsio-4.2.0/fitsio2.h 2023-08-09 10:29:44.960511085 +0800
@@ -151,6 +151,18 @@
# error "can't handle long size given by __riscv_xlen"
# endif

+#elif defined(__loongarch__)
+
+#define BYTESWAPPED TRUE
+
+# if __loongarch_grlen == 32
+# define LONGSIZE 32
+# elif __loongarch_grlen == 64
+# define LONGSIZE 64
+# else
+# error "can't handle long size given by __loongarch_grlen"
+# endif
+
/* ============================================================== */
/* the following are all 32-bit byteswapped platforms */

0 comments on commit 1de6886

Please sign in to comment.