summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2012-10-10 05:03:36 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2012-10-10 05:03:36 (GMT)
commit10ab09069deccfcf24bc224932e0271c55a6e6b9 (patch)
tree89ebf9b4ff00d9ce3f86b1475ad5f50514736e15 /config
parent990fdaed07823362929db38238a9092ecc3d4487 (diff)
downloadhdf5-10ab09069deccfcf24bc224932e0271c55a6e6b9.zip
hdf5-10ab09069deccfcf24bc224932e0271c55a6e6b9.tar.gz
hdf5-10ab09069deccfcf24bc224932e0271c55a6e6b9.tar.bz2
[svn-r22879] Bug Fix: HDFFV 8017
dt_arith would fail in Lion and Mountain Lion system when GCC version 4.2.1 is used with --enable-production. Somehow the -O optimization will fail some of the hard conversion code. Solution: This is just a temporary patch by detecting if this is a Lion or Mountain Lion system using GCC 4.2.1, then just remove the any -O option from the PROD_CFLAGS. A better fix should be deviced later. Tested: Duck(lion) and Owl (mountain lion) tested with --enable-production. Also tested in Fred and Tejeda, both Snow Leopard systems to verify there is no undesired side effect.
Diffstat (limited to 'config')
-rw-r--r--config/apple16
1 files changed, 16 insertions, 0 deletions
diff --git a/config/apple b/config/apple
index a2d6ae4..34085e0 100644
--- a/config/apple
+++ b/config/apple
@@ -28,6 +28,22 @@ fi
# Figure out compiler flags
. $srcdir/config/gnu-flags
+# temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not
+# use -O option as it causes failures in test/dt_arith.
+#echo host_os=$host_os
+case "$host_os" in
+ darwin1[12].*) # lion & mountain lion
+ #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version
+ case "$cc_vendor-$cc_version" in
+ gcc-4.2.1)
+ # Remove any -O flags
+ #echo PROD_CFLAGS=$PROD_CFLAGS
+ PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`"
+ #echo new PROD_CFLAGS=$PROD_CFLAGS
+ ;;
+ esac
+ ;;
+esac
. $srcdir/config/intel-flags
if test "X-" = "X-$FC"; then