summaryrefslogtreecommitdiffstats
path: root/config/gnu-flags
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2009-04-20 05:00:44 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2009-04-20 05:00:44 (GMT)
commit476cbeda792322fb66600eeb7022d303bd55d7c7 (patch)
tree0d381d221e4aa497b800e036cfcf168168c3f24f /config/gnu-flags
parentaa775d9738f0f56eef7dd5f1ee75179daffa16fa (diff)
downloadhdf5-476cbeda792322fb66600eeb7022d303bd55d7c7.zip
hdf5-476cbeda792322fb66600eeb7022d303bd55d7c7.tar.gz
hdf5-476cbeda792322fb66600eeb7022d303bd55d7c7.tar.bz2
[svn-r16789] Bug Fix (Bug 1398):
For gcc v4.3 and v4.4, with production mode, if -O3 is used, H5Tinit.c would fail to compile. Actually bad H5Tinit.c is produced. If -O (same as -O1) is used, H5Tinit.c compiled okay but test/dt_arith would fail with: Testing hard normalized long double -> signed char conversions time: comm and terminated abnormally When -O0 (no optimizatio) is used, H5Tinit.c compilete okay and all tests passed. Solution: Changed the config/gnu-flags to use -O0 for gcc v4.3 and 4.4 for production flags for now so that build and tests would work. Still need to investigate if the error is due to Gcc optimization bug or our code errors. Tested: In liberty with gcc43 and gcc44. Also, tested in jam and smirom with older versions of gcc. There are no gcc 43 or 44 compilers installed in other THG machines that I know.
Diffstat (limited to 'config/gnu-flags')
-rw-r--r--config/gnu-flags16
1 files changed, 11 insertions, 5 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 5fd72f2..c99a664 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -145,7 +145,17 @@ case "$cc_vendor-$cc_version" in
gcc-2.95.[34])
PROD_CFLAGS="-O3"
;;
- gcc-3.[0-4]*|gcc-4.[0123]*)
+ gcc-4.[34]*)
+ # The optimization level is reduced for gcc 4.[34] due to problems
+ # with code generation for src/H5Tconv.c with the -O (same -O1)
+ # optimization levels (which shows up as failures for long double
+ # types -> signed char conversion in the test/dt_arith test).
+ # There's either a bug in gcc or our code. Need further investigation.
+ # Turn off all optimizations to allow the tests to pass for now.
+ # - AKC - 2009/04/19
+ PROD_CFLAGS="-O0"
+ ;;
+ gcc-3.[0-4]*|gcc-4.[012]*)
# The optimization level is reduced for gcc 3.* and 4.* due to problems
# with code generation for src/H5Tconv.c with the -O2 & -O3
# optimization levels (which shows up as failures for various integer
@@ -153,10 +163,6 @@ case "$cc_vendor-$cc_version" in
# later versions of gcc will fix this bug... - QAK - 2003/10/20
PROD_CFLAGS="-O"
;;
- gcc-4*)
- # Be optimistic about future versions of gcc.. :-) - QAK - 2003/10/20
- PROD_CFLAGS="-O3"
- ;;
*)
PROD_CFLAGS="-O"
;;