Add initial attempt at ppc64le support (bug #1134385)

epel9
Orion Poplawski 10 years ago
parent ebcf45eb31
commit 07a787f8a7

@ -0,0 +1,62 @@
diff -up hdf-4.2.10/hdf/src/hconv.h.ppc64le hdf-4.2.10/hdf/src/hconv.h
--- hdf-4.2.10/hdf/src/hconv.h.ppc64le 2014-09-03 20:30:36.598974138 -0600
+++ hdf-4.2.10/hdf/src/hconv.h 2014-09-03 20:30:36.608974327 -0600
@@ -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__)
+#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__)
# define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
# define UI8_OUT DFKnb1b
# define SI16_IN DFKnb2b /* S = Signed */
diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc64le hdf-4.2.10/hdf/src/hdfi.h
--- hdf-4.2.10/hdf/src/hdfi.h.ppc64le 2014-09-03 20:30:36.599974157 -0600
+++ hdf-4.2.10/hdf/src/hdfi.h 2014-02-09 19:28:49.000000000 -0700
@@ -75,6 +75,7 @@
#define DFMT_IA64 0x4441
#define DFMT_LINUX64 0x4441
#define DFMT_POWERPC64 0x1111
+#define DFMT_POWERPC64LE 0x4441
#define DFMT_LINUXPPC 0x1111
#define DFMT_LINUXSPARC 0x1111
#define DFMT_LINUX390 0x1111
@@ -922,18 +923,24 @@ typedef int hdf_pint_t;
/*-----------------------------------------------------*/
-/* Power PC 5 64 */
#if defined __powerpc64__
-
+/* powerpc 64 bits */
#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
+#ifdef __LITTLE_ENDIAN__
+/* Power PC 8 64 little endian */
+#define DF_MT DFMT_POWERPC64LE
+#else
+/* Power PC 5 64 */
+#define DF_MT DFMT_POWERPC64
+#endif
+
#include <sys/file.h> /* for unbuffered i/o stuff */
#include <sys/stat.h>
-#define DF_MT DFMT_POWERPC64
typedef void VOID;
typedef void *VOIDP;
typedef char *_fcd;
@@ -969,8 +976,9 @@ typedef long hdf_pint_t;
#define INCLUDES_ARE_ANSI
#endif
+#endif /* powerpc 64 bits */
+
/*-----------------------------------------------------*/
-#endif /*power PC 5 64 */
/* Linux 64 */
#if defined(__linux__) && defined __x86_64__ && !(defined SUN) /* i.e. 64-bit Linux but not SunOS on Intel */

@ -1,6 +1,6 @@
Name: hdf
Version: 4.2.10
Release: 5%{?dist}
Release: 6%{?dist}
Summary: A general purpose library and file format for storing scientific data
License: BSD
Group: System Environment/Libraries
@ -20,6 +20,9 @@ Patch6: hdf-examplesdir.patch
Patch7: hdf-format.patch
# Add AArch64 definitions
Patch8: hdf-4.2.10-aarch64.patch
# ppc64le support
# https://bugzilla.redhat.com/show_bug.cgi?id=1134385
Patch9: hdf-ppc64le.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# For destdir/examplesdir patches
@ -64,6 +67,7 @@ HDF development headers and libraries.
%patch6 -p1 -b .examplesdir
%patch7 -p1 -b .format
%patch8 -p1 -b .aarch64
%patch9 -p1 -b .ppc64le
chmod a-x *hdf/*/*.c hdf/*/*.h
# restore include file timestamps modified by patching
@ -134,6 +138,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Sep 3 2014 Orion Poplawski <orion@cora.nwra.com> - 4.2.10-6
- Add initial attempt at ppc64le support (bug #1134385)
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

Loading…
Cancel
Save