!16 add sw64 support
From: @maqi77 Reviewed-by: @wk333 Signed-off-by: @wk333
This commit is contained in:
commit
5b5ccc1eff
112
add-sw-support.patch
Normal file
112
add-sw-support.patch
Normal file
@ -0,0 +1,112 @@
|
||||
From 023b54213cc5405b2ecc60694238dd2bed358010 Mon Sep 17 00:00:00 2001
|
||||
From: maqi <maqi@uniontech.com>
|
||||
Date: Wed, 6 Nov 2024 13:22:40 +0800
|
||||
Subject: [PATCH] hdf uos add sw support
|
||||
|
||||
---
|
||||
hdf/src/atom.h | 2 ++
|
||||
hdf/src/hconv.h | 2 +-
|
||||
hdf/src/hdfi.h | 52 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 55 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hdf/src/atom.h b/hdf/src/atom.h
|
||||
index 7617bd0..33904a9 100644
|
||||
--- a/hdf/src/atom.h
|
||||
+++ b/hdf/src/atom.h
|
||||
@@ -34,7 +34,9 @@
|
||||
#define HASH_SIZE_POWER_2
|
||||
|
||||
/* Define the following macro for atom caching over all the atoms */
|
||||
+#if !defined(__sw_64__)
|
||||
#define ATOMS_ARE_CACHED
|
||||
+#endif
|
||||
|
||||
/* Define the following macro for "inline" atom lookups from the cache */
|
||||
#ifdef ATOMS_ARE_CACHED /* required for this to work */
|
||||
diff --git a/hdf/src/hconv.h b/hdf/src/hconv.h
|
||||
index 98eaa3e..6b80509 100644
|
||||
--- a/hdf/src/hconv.h
|
||||
+++ b/hdf/src/hconv.h
|
||||
@@ -59,7 +59,7 @@
|
||||
/* CONSTANT DEFINITIONS */
|
||||
/*****************************************************************************/
|
||||
/* Generally Big-Endian machines */
|
||||
-#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !defined(__arm__) && !defined(__AARCH64EL__) && !defined(__LITTLE_ENDIAN__) && !defined(__loongarch64) && !defined(__riscv)
|
||||
+#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !defined(__arm__) && !defined(__AARCH64EL__) && !defined(__LITTLE_ENDIAN__) && !defined(__loongarch64) && !defined(__riscv) && !defined(__sw_64__)
|
||||
# define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
|
||||
# define UI8_OUT DFKnb1b
|
||||
# define SI16_IN DFKnb2b /* S = Signed */
|
||||
diff --git a/hdf/src/hdfi.h b/hdf/src/hdfi.h
|
||||
index e9de780..89c4fe7 100644
|
||||
--- a/hdf/src/hdfi.h
|
||||
+++ b/hdf/src/hdfi.h
|
||||
@@ -70,6 +70,7 @@
|
||||
#define DFMT_NEXT 0x1111
|
||||
#define DFMT_MOTOROLA 0x1111
|
||||
#define DFMT_ALPHA 0x4441
|
||||
+#define DFMT_SW_64 0x4441
|
||||
#define DFMT_VP 0x6611
|
||||
#define DFMT_I860 0x4441
|
||||
#define DFMT_IA64 0x4441
|
||||
@@ -1424,6 +1425,57 @@ typedef long hdf_pint_t; /* an integer the same size as a pointer
|
||||
#endif
|
||||
#endif /* Linux LoongArch64 */
|
||||
|
||||
+/* Linux SW_64 */
|
||||
+#if defined __sw_64__
|
||||
+
|
||||
+#ifdef GOT_MACHINE
|
||||
+If you get an error on this line more than one machine type has been defined.
|
||||
+Please check your Makefile.
|
||||
+#endif
|
||||
+#define GOT_MACHINE
|
||||
+
|
||||
+#include <sys/file.h> /* for unbuffered i/o stuff */
|
||||
+#include <sys/stat.h>
|
||||
+#define DF_MT DFMT_SW_64
|
||||
+typedef void VOID;
|
||||
+typedef void *VOIDP;
|
||||
+typedef char *_fcd;
|
||||
+typedef char char8;
|
||||
+typedef unsigned char uchar8;
|
||||
+typedef char int8;
|
||||
+typedef unsigned char uint8;
|
||||
+typedef short int int16;
|
||||
+typedef unsigned short int uint16;
|
||||
+typedef long int int32;
|
||||
+typedef unsigned long int uint32;
|
||||
+typedef int intn;
|
||||
+typedef unsigned int uintn;
|
||||
+typedef int intf; /* size of INTEGERs in Fortran compiler */
|
||||
+typedef float float32;
|
||||
+typedef double float64;
|
||||
+typedef int hdf_pint_t; /* an integer the same size as a pointer */
|
||||
+#define FNAME_POST_UNDERSCORE
|
||||
+#define _fcdtocp(desc) (desc)
|
||||
+#ifdef HAVE_FMPOOL
|
||||
+#define FILELIB PAGEBUFIO /* enable page buffering */
|
||||
+#else
|
||||
+#define FILELIB UNIXBUFIO
|
||||
+#endif
|
||||
+
|
||||
+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
|
||||
+
|
||||
+/* Determine the memory manager we are going to use. Valid values are: */
|
||||
+/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
|
||||
+/* what each does */
|
||||
+#define JMEMSYS MEM_ANSI
|
||||
+
|
||||
+#ifdef __GNUC__
|
||||
+#define HAVE_STDC
|
||||
+#define INCLUDES_ARE_ANSI
|
||||
+#endif
|
||||
+
|
||||
+#endif /* Linux SW_64 */
|
||||
+
|
||||
#if defined (__linux__) && defined (__riscv) && (__riscv_xlen == 64)
|
||||
|
||||
#ifdef GOT_MACHINE
|
||||
--
|
||||
2.39.3
|
||||
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
--- configure.orig.ac 2017-06-24 23:00:04.000000000 +0200
|
||||
+++ configure.ac 2017-07-21 22:13:19.695919835 +0200
|
||||
@@ -264,10 +264,10 @@
|
||||
JNIFLAGS="$JNIFLAGS -I$JNI_INCLUDE_DIR"
|
||||
done
|
||||
## Find junit for testing the JNI code
|
||||
- AX_CHECK_CLASSPATH()
|
||||
- CLASSPATH_ENV=$H4_CLASSPATH
|
||||
- AX_CHECK_JUNIT()
|
||||
- AX_CHECK_JAVA_HOME
|
||||
+ ## AX_CHECK_CLASSPATH()
|
||||
+ ## CLASSPATH_ENV=$H4_CLASSPATH
|
||||
+ ## AX_CHECK_JUNIT()
|
||||
+ ## AX_CHECK_JAVA_HOME
|
||||
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
8
hdf.spec
8
hdf.spec
@ -1,6 +1,6 @@
|
||||
Name: hdf
|
||||
Version: 4.2.14
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: A general purpose library and file format for storing scientific data
|
||||
License: IJG
|
||||
URL: https://portal.hdfgroup.org/
|
||||
@ -22,6 +22,8 @@ Patch9: hdf-ppc64le.patch
|
||||
Patch10: 0001-add-loongarch64-support-for-hdf.patch
|
||||
## riscv64 support
|
||||
Patch11: hdf-riscv64.patch
|
||||
## sw_64 support
|
||||
Patch12: add-sw-support.patch
|
||||
|
||||
# Fix syntax error on epel6 builds
|
||||
# Use only if java is disabled
|
||||
@ -67,6 +69,7 @@ HDF development headers and libraries.
|
||||
%patch9 -p1 -b .ppc64le
|
||||
%patch10 -p1 -b .loongarch64
|
||||
%patch11 -p1 -b .riscv64
|
||||
%patch12 -p1 -b .sw64
|
||||
|
||||
find . -type f -name "*.h" -exec chmod 0644 '{}' \;
|
||||
find . -type f -name "*.c" -exec chmod 0644 '{}' \;
|
||||
@ -139,6 +142,9 @@ make -j1 check
|
||||
%{_pkgdocdir}/examples/
|
||||
|
||||
%changelog
|
||||
* Tue Mar 04 2025 maqi <maqi@uniontech.com> - 4.2.14-5
|
||||
- Add sw64 support for hdf
|
||||
|
||||
* Wed Jun 14 2023 EastDong <xudong23@iscas.ac.cn> - 4.2.14-4
|
||||
- Add riscv64 support
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user