Update of /cvsroot/monetdb/buildtools/conf
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2186/conf
Modified Files:
Tag: MonetDB_1-20
MonetDB.m4
Log Message:
triggered by the testing problems that followed my initial fix of
[ 1827627 ] --enable-bits doesn't work with icc
http://sourceforge.net/tracker/index.php?func=detail&aid=1827627&group_id=56967&atid=482468
I revised the whole [--enable-]bits management in our configure setup:
- completely ignore --enable-bits if the native/default setup already does the
requested job
- keep complaining that --enable-bits cannot be used with icc
- do no longer refuse any --enable-bits request by default on any platform
- in case --enable-bits differs from the native/default setup:
+ set CC accordingly for all compiler/platform combination we know (have seen)
+ complain about unknown combinations and suggest to use CC, CFLAGS and/or
LDFLAGS instead
+ double-check, whether the modified CC indeed does what --enable-bits
requested,
and raise an error if not.
Index: MonetDB.m4
===================================================================
RCS file: /cvsroot/monetdb/buildtools/conf/MonetDB.m4,v
retrieving revision 1.37.2.16
retrieving revision 1.37.2.17
diff -u -d -r1.37.2.16 -r1.37.2.17
--- MonetDB.m4 22 Nov 2007 00:03:32 -0000 1.37.2.16
+++ MonetDB.m4 22 Nov 2007 14:06:27 -0000 1.37.2.17
@@ -465,60 +465,51 @@
[obsolete: use --enable-bits instead]),
AC_MSG_ERROR([argument --with-bits is obsolete: use --enable-bits
instead]))
-bits="no"
+AC_CHECK_SIZEOF(long)
+native_bits=`expr $ac_cv_sizeof_long \* 8`
+bits=$native_bits
AC_ARG_ENABLE(bits,
AC_HELP_STRING([--enable-bits=BITS],
[specify number of bits (32 or 64)]), [
-case "$host-$GCC-$CC-$enableval" in
-ia64*-*-*-32)
- AC_MSG_ERROR([we do not support 32 bits on $host]);;
-i?86*-*-*-64)
- AC_MSG_ERROR([$host does not support 64 bits]);;
-*--icc*-32|*--icc*-64)
- AC_MSG_ERROR([icc does not support a command line option to switch
between 32- & 64-bit compilation; use CC & PATH (instead of
--enable-bits=$enableval) to point to the $enableval-bit version of icc]);;
-*-*-*-32|*-*-*-64)
+case "$GCC-$CC-$enableval" in
+*-*-$native_bits)
+ ;;
+-icc*-*)
+ AC_MSG_ERROR([icc does not support a command line option to switch
between 32- & 64-bit compilation; please use CC & PATH (instead of
--enable-bits=$enableval) to point to the $enableval-bit version of icc])
+ ;;
+*-*-32|*-*-64)
;;
*)
- AC_MSG_ERROR(--enable-bits argument must be either 32 or 64);;
+ AC_MSG_ERROR(--enable-bits argument must be either 32 or 64)
+ ;;
esac
bits=$enableval
])
-if test "$bits" = "64"; then
- dnl Keep in mind how to call the 32-bit compiler.
- case "$GCC-$CC-$host_os-$host" in
- yes-*-linux*-x86_64*)
- dnl On our x86_64 machine, "gcc" defaults to "gcc -m64" ...
- CC32="$CC -m32";;
- -pgcc*-linux*-x86_64*)
- dnl On our x86_64 machine, "pgcc" defaults to "pgcc -tp=k8-64"
...
- CC32="$CC -tp=k8-32";;
- *) CC32="$CC";;
- esac
-fi
-if test x"$bits" != xno; then
case "$GCC-$CC-$host_os-$host-$bits" in
-yes-*-solaris*-64)
- case `$CC -v 2>&1` in
- *'gcc version 3.'*) ;;
+*-*-*-*-$native_bits)
+ ;;
+yes-*-solaris*-*-*)
+ case `$bits-$CC -v 2>&1` in
+ 32-*|*-*'gcc version 3.'*) ;;
*) AC_MSG_ERROR([need GCC version 3.X for 64 bits]);;
esac
CC="$CC -m$bits"
;;
--*-solaris*-64)
+-*-solaris*-*-64)
CC="$CC -xarch=v9"
;;
-yes-*-irix*-64)
+yes-*-irix*-*-*)
CC="$CC -mabi=$bits"
;;
--*-irix*-64)
+-*-irix*-*-*)
CC="$CC -$bits"
;;
-yes-*-aix*-64)
+yes-*-aix*-*-64)
CC="$CC -maix$bits"
AR="ar -X64"
NM="nm -X64 -B"
;;
--*-aix*-64)
+-*-aix*-*-64)
CC="$CC -q$bits"
AR="ar -X64"
NM="nm -X64 -B"
@@ -532,16 +523,17 @@
yes-*-darwin8*-powerpc*-*)
CC="$CC -m$bits"
;;
-dnl Assume native bits are default, and hence, require no action
-*-*-*-x86_64*-64|*-*-*-ia64*-64|*-*-*-i?86*-32)
- ;;
*)
- AC_MSG_ERROR([case "$GCC-$CC-$host_os-$host-$bits" not handled with
--enable-bits])
+ AC_MSG_ERROR([case "$GCC-$CC-$host_os-$host-$bits" not handled with
--enable-bits, yet; please use CC, CFLAGS and/or LDFLAGS (instead of
--enable-bits=$bits) to make "$CC" produce $bits-bit code])
;;
esac
-else
+if test x"$bits" != x"$native_bits"; then
+ unset ac_cv_sizeof_long
AC_CHECK_SIZEOF(long)
- bits=`expr $ac_cv_sizeof_long \* 8`
+ alien_bits=`expr $ac_cv_sizeof_long \* 8`
+ if test x"$alien_bits" != x"$bits"; then
+ AC_MSG_ERROR([CC="$CC" seems to produce $alien_bits-bit code,
not matching the "--enable-bits=$bits" request])
+ fi
fi
AC_SUBST(bits)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins