summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-07-05 20:06:35 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-07-05 20:06:35 (GMT)
commit3019e7a31cd02eee24e0b57067dfae7a93cb32ff (patch)
tree23a3c65d09a649cf6507440e14d95f44d1ffec38
parentd47f56d23462b978f0cef42957e7b4ef0c698d96 (diff)
downloadhdf5-3019e7a31cd02eee24e0b57067dfae7a93cb32ff.zip
hdf5-3019e7a31cd02eee24e0b57067dfae7a93cb32ff.tar.gz
hdf5-3019e7a31cd02eee24e0b57067dfae7a93cb32ff.tar.bz2
[svn-r11021] Purpose: Add detection.
Description: pgcc version 6.0x have optimization (-O, -O2, or -O3) problem. It caused multi driver test to fail. The problem happened in a macro definition. Solution: Detect these versions and add option "-Mx,28,0x8" to the compiler to avoid the problem if optimization is enable. Platforms tested: mir -simple change.
-rwxr-xr-xconfigure5
-rw-r--r--configure.in18
-rw-r--r--src/H5FDmulti.c21
3 files changed, 23 insertions, 21 deletions
diff --git a/configure b/configure
index 1fe503d..e44ecc1 100755
--- a/configure
+++ b/configure
@@ -7881,6 +7881,7 @@ EOF
;;
esac
+
case "$INSTALL" in
*install-sh*)
INSTALL='\${top_srcdir}/bin/install-sh -c'
@@ -36566,6 +36567,10 @@ if test -n "$cc_vendor" && test -n "$cc_version"; then
CC_VERSION="$CC_VERSION ($cc_vendor-$cc_version)"
fi
+if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_production" = "Xyes"; then
+ CC="${CC-cc} -Mx,28,0x8"
+fi
+
if test -x /bin/pwd; then
pwd=/bin/pwd
else
diff --git a/configure.in b/configure.in
index 8e06faf..ae06d81 100644
--- a/configure.in
+++ b/configure.in
@@ -336,6 +336,15 @@ EOF
;;
esac
+dnl ----------------------------------------------------------------------
+dnl pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect
+dnl these versions and add option "-Mx,28,0x8" to the compiler to avoid
+dnl the problem if optimization is enable.
+dnl
+dnl if test "X$enable_production" = "Xyes"; then
+dnl CC="${CC-cc} -Mx,28,0x8"
+dnl fi
+
dnl Fix up the INSTALL macro if it's a relative path. We want the
dnl full-path to the binary instead.
case "$INSTALL" in
@@ -2225,6 +2234,15 @@ if test -n "$cc_vendor" && test -n "$cc_version"; then
fi
dnl ----------------------------------------------------------------------
+dnl pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect
+dnl these versions and add option "-Mx,28,0x8" to the compiler to avoid
+dnl the problem if optimization is enable.
+dnl
+if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_production" = "Xyes"; then
+ CC="${CC-cc} -Mx,28,0x8"
+fi
+
+dnl ----------------------------------------------------------------------
dnl Where is the root of the source tree. Give an absolute address so
dnl we can find it no matter which directory of the distribution is our
dnl current directory. The built-in pwd fails on some systems, but the
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 14905a5..0289096 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -53,10 +53,6 @@
#endif
/* Loop through all mapped files */
-#ifdef TMP
-/*The -O2 optimization of the PGCC in mir has a bug for this macro. A workaround
- *is provided here to avoid the problem temporarily until the compiler bug is fixed.
- *SLU - 2005/6/13 */
#define UNIQUE_MEMBERS(MAP,LOOPVAR) { \
H5FD_mem_t _unmapped, LOOPVAR; \
hbool_t _seen[H5FD_MEM_NTYPES]; \
@@ -67,23 +63,6 @@
if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \
assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
if (_seen[LOOPVAR]++) continue;
-#else /*TMP*/
-#define UNIQUE_MEMBERS(MAP,LOOPVAR) { \
- H5FD_mem_t _unmapped, LOOPVAR; \
- hbool_t _seen[H5FD_MEM_NTYPES]; \
- \
- memset(_seen, 0, sizeof _seen); \
- for (_unmapped=H5FD_MEM_SUPER; _unmapped<H5FD_MEM_NTYPES; _unmapped=(H5FD_mem_t)(_unmapped+1)) { \
- LOOPVAR = MAP[_unmapped]; \
- if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \
- assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
- \
- if(_seen[LOOPVAR]) { \
- _seen[LOOPVAR]++; \
- continue; \
- } \
- _seen[LOOPVAR]++;
-#endif /*TMP*/
#ifdef LATER
#define MAPPED_MEMBERS(MAP,LOOPVAR) { \