MS: When getting the data for Optimized compilation of tcl, I met a few problems when compiling tcl with Intel's icc6.0 compiler for linux [L1 ]. This is how I (mostly) solved them.
Solution: write a driving script that intercepts the offending writing.
Solution: use the "-D_GNU_SOURCE" flag
Difficulties #1 and #2 were solved by calling the compiler through the following script (which can certainly be improved to not use temp files by some better bash programmer than myself):
#! /bin/sh
if [ $# != 0 ]
then
##
## REPLACEMENT for the icc script in order to compile tcl
##
## Replacement was needed because (AFAIU, which is not much):
## (1) icc writes the filename to stderr even when it compiles
## succesfully and with no warnings
## (2) the configure script was producing an unusable set of flags,
## and defining the macro _GNU_SOURCE fixed that. The problem
## seems to be in the 64bit support headers; is this a
## problem with icc or with tcl's configure script?
##
eval /opt/intel/compiler60/ia32/bin/icc -D_GNU_SOURCE '$@' > icc.out 2> icc.err;
errCode=$?
cat icc.out
if (test $errCode -ne 0 || test ` cat icc.err | wc -l` -gt 1);
then
cat icc.err 1>&2
fi
exit $errCode
## END REPLACEMENT
else
exec -a "/opt/intel/compiler60/ia32/bin/icc" /opt/intel/compiler60/ia32/bin/iccbin;
fi