From cfc1dffd1489353c0fedf8d45df6579c73ddeb2c Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Sat, 3 Mar 2012 00:00:33 -0500 Subject: [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*. --- config/gnu-flags | 8 +++++++- config/intel-flags | 2 +- 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" -- cgit v0.12