summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2012-03-03 05:00:33 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2012-03-03 05:00:33 (GMT)
commitcfc1dffd1489353c0fedf8d45df6579c73ddeb2c (patch)
tree4b37340df3b4d7bfd089337af8f7ea496aee413b
parentf99cdd5afe2f86c83b502ca7b27e293d3a17eb45 (diff)
downloadhdf5-cfc1dffd1489353c0fedf8d45df6579c73ddeb2c.zip
hdf5-cfc1dffd1489353c0fedf8d45df6579c73ddeb2c.tar.gz
hdf5-cfc1dffd1489353c0fedf8d45df6579c73ddeb2c.tar.bz2
[svn-r22020] 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*.
-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"