From 226950b61631d6fba1e2069571310f47a7dcd8aa Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 26 Aug 2004 14:03:33 -0500 Subject: [svn-r9162] Purpose: Bug fix. Description: $CXX_BASENAME was not set yet if $CXX was pre-set to g++. In turn, CXX_flags are not picking up the g++ values. Solution: The correct solution should be done in configure which should have setup CXX_BASENAME if $CC is set before sourcing this file. Put a special patch here for g++ for now. (Also added the recognization of icc as another name for Intel compilers.) Platforms tested: No h5committest but tested in TG-NCSA since these changes affected the IA64 platform only. Misc. update: --- config/ia64-linux-gnu | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/config/ia64-linux-gnu b/config/ia64-linux-gnu index 85ad2b7..c93c218 100644 --- a/config/ia64-linux-gnu +++ b/config/ia64-linux-gnu @@ -20,7 +20,7 @@ fi # So it is removed. case $CC_BASENAME in - ecc) + ecc|icc) # Default to C99 standard. CFLAGS="${CFLAGS:--std=c99}" DEBUG_CFLAGS="-w2 -Wall -g -O0" @@ -100,15 +100,30 @@ if test "X$f9x_flags_set" = "X"; then f9x_flags_set=yes fi - # The Default settings for C++ if test -z "$CXX"; then CXX=ecc CXX_BASENAME=ecc fi +# A patch to make g++ getting the default settings. +# CXX_BASENAME should have been set in configure. +if test $CXX = g++; then + CXX_BASENAME=g++ +if + case $CXX_BASENAME in + ecc|icc) # Intel compilers + # Default to C99 standard. + CXXFLAGS="${CXXFLAGS:--std=c99}" + DEBUG_CXXFLAGS="-g -w2 -Wall" + DEBUG_CPPFLAGS= + PROD_CXXFLAGS="" #Default optimization O2 is used + PROD_CPPFLAGS= + PROFILE_CXXFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; g++) CXXFLAGS="$CXXFLAGS -Wsign-compare" #Only works for some versions DEBUG_CXXFLAGS="-g -fverbose-asm" @@ -122,9 +137,9 @@ case $CXX_BASENAME in *) # Default to C99 standard. CXXFLAGS="${CXXFLAGS:--std=c99}" - DEBUG_CXXFLAGS="-g -w2 -Wall" + DEBUG_CXXFLAGS="-g" DEBUG_CPPFLAGS= - PROD_CXXFLAGS="" #Default optimization O2 is used + PROD_CXXFLAGS="-O" PROD_CPPFLAGS= PROFILE_CXXFLAGS="-pg" PROFILE_CPPFLAGS= -- cgit v0.12