summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2012-03-09 21:50:36 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2012-03-09 21:50:36 (GMT)
commite4850a716f476b5c802a60be14b3ac4781f7bd47 (patch)
tree3d38101d4a3a7235e77c4be4015ebd9b9f1c1e95
parentbffb2fc65ff676a8ff59e1ab8742f6ca0f64c7c4 (diff)
downloadhdf5-e4850a716f476b5c802a60be14b3ac4781f7bd47.zip
hdf5-e4850a716f476b5c802a60be14b3ac4781f7bd47.tar.gz
hdf5-e4850a716f476b5c802a60be14b3ac4781f7bd47.tar.bz2
[svn-r22039] Fix for HDFFV-7878.
gnu-flags Don't add gcc flags for intel compiler even though its version display includes "gcc ". intel-flags Extend intel version to include icc-12*. Tested on jam, koal, ostrich with h5committest. Chedcked in to trnk last week.
-rw-r--r--config/gnu-flags8
-rw-r--r--config/intel-flags2
2 files changed, 8 insertions, 2 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 1222c87..38ea4e4 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -28,8 +28,14 @@
if test X = "X$cc_flags_set"; then
# PathScale compiler spits out gcc version string too. Need to
# filter it out.
+ # icc beginning with version 12 includes a "gcc version compatiblilty"
+ # string, causing the gcc H5_CFLAGS to be erroneously added. The line
+ # "grep -v 'icc version'" causes the discarding of any output
+ # containing 'icc version'. The cc_version for icc is correctly determined
+ # and flags added in the intel-flags script.
cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 | grep -v 'PathScale' |\
- grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
+ grep -v 'icc version' |\
+ grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'`
cc_version=`echo $cc_version |sed 's/[-a-z]//g'`
if test X = "X$cc_vendor" -a X != "X$cc_version"; then
diff --git a/config/intel-flags b/config/intel-flags
index e6a9c31..1d01d7f 100644
--- a/config/intel-flags
+++ b/config/intel-flags
@@ -93,7 +93,7 @@ fi
# Please follow the pattern below by adding new versions at the top, copying
# the information from the previous version and adding modifications to that.
case "$cc_vendor-$cc_version" in
- icc-11*)
+ icc-11* | icc-12*)
# -s became obsolete; we also fixed bugs that allow us to enable higher level
# of optimization starting with 1.8.7
PROD_CFLAGS="-O3"