- Difficulty #1: icc writes to stderr even on succesful compilations without warnings, gcc does not. This was tripping part of the configure script.
- Difficulty #2: the configure script was producing an unusable set of macros (my guess is that the substitute headers provided with icc should also include a substitute for <features.h>).
- Difficulty #3: NOT THERE! This was a side-effect of my clumsy shell programming below (quoting issue, corrected now).
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
