the config script contains
414 # Only set CC if not supplied already
415 if [ -z "$CROSS_COMPILE$CC" ]; then
416 GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null`
In our case we do set "CC", but we do not cross compile. Since CC is
set, the "-z" test fails and consequently the GCCVER variable is not
set. Later down, for Solaris it compares GCCVER to "28" and due to the
variable being "0" it falls back to old gcc compiler mode despite we are
using gcc 4.
I don't know enough about cross compilation, but the following is a
proposed fix assuming that non-gcc compilers set in CC will only write
an error when called with "-dumpversion":
--- config Sat Dec 10 11:57:36 2011
+++ config Sat Dec 10 12:56:36 2011
@@ -411,9 +411,9 @@
# this is where the translation occurs into SSLeay terms
#
---------------------------------------------------------------------------
-# Only set CC if not supplied already
-if [ -z "$CROSS_COMPILE$CC" ]; then
- GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null`
+# Only set if not cross compiling
+if [ -z "$CROSS_COMPILE" ]; then
+ GCCVER=`sh -c "${CC:-gcc} -dumpversion" 2>/dev/null`
if [ "$GCCVER" != "" ]; then
# then strip off whatever prefix egcs prepends the number with...
# Hopefully, this will work for any future prefixes as well.
@@ -423,9 +423,9 @@
# major and minor version numbers.
# peak single digit before and after first dot, e.g. 2.95.1 gives 29
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
- CC=gcc
+ CC=${CC:-gcc}
else
- CC=cc
+ CC=${CC:-cc}
fi
fi
GCCVER=${GCCVER:-0}
Alternatively one could only try to use "-dumpversion" if C is not set
or e.g. the first token in CC has a basename "gcc". But this would not
work, e.g. for CC=/my/path/bin/gcc-4.1.2 or similar.
Regards,
Rainer
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majord...@openssl.org