summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"