- Add patch to fix strict-aliasing
- Disable production mode to enable debuginfo
This commit is contained in:
parent
609272dcb8
commit
aad3b63a63
42
hdf5-1.6.6-alias.patch
Normal file
42
hdf5-1.6.6-alias.patch
Normal file
@ -0,0 +1,42 @@
|
||||
--- hdf5-1.6.6/test/dtypes.c.alias 2007-08-16 10:12:05.000000000 -0600
|
||||
+++ hdf5-1.6.6/test/dtypes.c 2008-02-06 10:14:42.000000000 -0700
|
||||
@@ -5645,24 +5645,33 @@
|
||||
for (j=0; j<nelmts; j++) {
|
||||
/* Do it this way for alignment reasons */
|
||||
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
|
||||
- long double temp[1];
|
||||
+ union {
|
||||
+ long double ld[1];
|
||||
+ double d[1];
|
||||
+ float f[1];
|
||||
+ unsigned char uc[1];
|
||||
+ } temp;
|
||||
#else
|
||||
- double temp[1];
|
||||
+ union {
|
||||
+ double d[1];
|
||||
+ float f[1];
|
||||
+ unsigned char uc[1];
|
||||
+ } temp;
|
||||
#endif
|
||||
if (src_size<=dst_size) {
|
||||
for (k=0; k<dst_size; k++) buf[j*src_size+k] = HDrand();
|
||||
} else {
|
||||
for (k=0; k<dst_size; k++)
|
||||
- ((unsigned char*)temp)[k] = HDrand();
|
||||
+ temp.uc[k] = HDrand();
|
||||
if (FLT_DOUBLE==src_type && FLT_FLOAT==dst_type) {
|
||||
- hw_d = *((float*)temp);
|
||||
+ hw_d = *(temp.f);
|
||||
HDmemcpy(buf+j*src_size, &hw_d, src_size);
|
||||
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
|
||||
} else if (FLT_LDOUBLE==src_type && FLT_FLOAT==dst_type) {
|
||||
- hw_ld = *((float*)temp);
|
||||
+ hw_ld = *(temp.f);
|
||||
HDmemcpy(buf+j*src_size, &hw_ld, src_size);
|
||||
} else if (FLT_LDOUBLE==src_type && FLT_DOUBLE==dst_type) {
|
||||
- hw_ld = *((double*)temp);
|
||||
+ hw_ld = *(temp.d);
|
||||
HDmemcpy(buf+j*src_size, &hw_ld, src_size);
|
||||
#endif
|
||||
}
|
14
hdf5.spec
14
hdf5.spec
@ -1,6 +1,6 @@
|
||||
Name: hdf5
|
||||
Version: 1.6.6
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: A general purpose library and file format for storing scientific data
|
||||
License: BSD
|
||||
Group: System Environment/Libraries
|
||||
@ -18,6 +18,7 @@ Patch10: hdf5-1.6.5-open.patch
|
||||
Patch11: hdf5-1.6.6-alpha.patch
|
||||
Patch12: hdf5-1.6.6-s390.patch
|
||||
Patch13: hdf5-1.6.6-free.patch
|
||||
Patch14: hdf5-1.6.6-alias.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: krb5-devel, openssl-devel, zlib-devel, gcc-gfortran, time
|
||||
|
||||
@ -52,14 +53,17 @@ HDF5 development headers and libraries.
|
||||
%patch11 -p1 -b .alpha
|
||||
%patch12 -p1 -b .s390
|
||||
%patch13 -p1 -b .free
|
||||
%patch14 -p1 -b .alias
|
||||
|
||||
|
||||
%build
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
export F9X=gfortran
|
||||
%configure --with-ssl --enable-cxx --enable-fortran \
|
||||
--enable-threadsafe --with-pthread
|
||||
# Must turn of production mode to preserve -g during compile
|
||||
%configure --enable-production=no --enable-debug=no \
|
||||
--enable-cxx --enable-fortran --enable-threadsafe \
|
||||
--with-pthread --with-ssl
|
||||
make
|
||||
|
||||
|
||||
@ -115,6 +119,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 6 2008 Orion Poplawski <orion@cora.nwra.com> 1.6.6-7
|
||||
- Add patch to fix strict-aliasing
|
||||
- Disable production mode to enable debuginfo
|
||||
|
||||
* Tue Feb 5 2008 Orion Poplawski <orion@cora.nwra.com> 1.6.6-6
|
||||
- Add patch to fix calling free() in H5PropList.cpp
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user