rpms/hdf5/devel hdf5-1.6.6-alias.patch, NONE, 1.1 hdf5.spec, 1.21, 1.22
Orion Poplawski (orion)
fedora-extras-commits at redhat.com
Wed Feb 6 22:14:38 UTC 2008
Author: orion
Update of /cvs/pkgs/rpms/hdf5/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7177
Modified Files:
hdf5.spec
Added Files:
hdf5-1.6.6-alias.patch
Log Message:
* Wed Feb 6 2008 Orion Poplawski <orion at cora.nwra.com> 1.6.6-7
- Add patch to fix strict-aliasing
- Disable production mode to enable debuginfo
hdf5-1.6.6-alias.patch:
--- NEW FILE hdf5-1.6.6-alias.patch ---
--- 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
}
Index: hdf5.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hdf5/devel/hdf5.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- hdf5.spec 5 Feb 2008 22:29:04 -0000 1.21
+++ hdf5.spec 6 Feb 2008 22:13:53 -0000 1.22
@@ -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 @@
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 @@
%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 @@
%changelog
+* Wed Feb 6 2008 Orion Poplawski <orion at 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 at cora.nwra.com> 1.6.6-6
- Add patch to fix calling free() in H5PropList.cpp
More information about the fedora-extras-commits
mailing list