diff options
author | das <das> | 2006-11-26 06:05:04 (GMT) |
---|---|---|
committer | das <das> | 2006-11-26 06:05:04 (GMT) |
commit | 1e5924cac38af07244b3257657a90cd6aed749f9 (patch) | |
tree | ce4812e03e69909ff0da014a608eaa9554c4829e | |
parent | 53f0f5e9e29ff6ebd929b1d491643311824acdcf (diff) | |
download | tcl-1e5924cac38af07244b3257657a90cd6aed749f9.zip tcl-1e5924cac38af07244b3257657a90cd6aed749f9.tar.gz tcl-1e5924cac38af07244b3257657a90cd6aed749f9.tar.bz2 |
* tcl.m4 (Linux): --enable-64bit support. [Patch 1597389], [Bug 1230558]
* configure: autoconf-2.59
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | unix/configure | 66 | ||||
-rw-r--r-- | unix/tcl.m4 | 13 |
3 files changed, 82 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-11-26 Daniel Steffen <das@users.sourceforge.net> + + * tcl.m4 (Linux): --enable-64bit support. [Patch 1597389], [Bug 1230558] + * configure: autoconf-2.59 + 2006-11-25 Donal K. Fellows <dkf@users.sf.net> TIP#269 IMPLEMENTATION diff --git a/unix/configure b/unix/configure index e2ce802..c6ec11d 100755 --- a/unix/configure +++ b/unix/configure @@ -7091,7 +7091,7 @@ echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" - SHLIB_LD="${CC} -shared" + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" @@ -7100,6 +7100,70 @@ echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} if test "`uname -m`" = "alpha" ; then CFLAGS="$CFLAGS -mieee" fi + if test $do64bit = yes; then + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 +if test "${tcl_cv_cc_m64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -m64" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_m64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_m64=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 + if test $tcl_cv_cc_m64 = yes; then + CFLAGS="$CFLAGS -m64" + do64bit_ok=yes + fi + fi # The combo of gcc + glibc has a bug related # to inlining of functions like strtod(). The diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 8c900dd..ff09cd0 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1402,7 +1402,7 @@ dnl AC_CHECK_TOOL(AR, ar) # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" - SHLIB_LD="${CC} -shared" + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" @@ -1411,6 +1411,17 @@ dnl AC_CHECK_TOOL(AR, ar) if test "`uname -m`" = "alpha" ; then CFLAGS="$CFLAGS -mieee" fi + if test $do64bit = yes; then + AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [ + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -m64" + AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_m64 = yes; then + CFLAGS="$CFLAGS -m64" + do64bit_ok=yes + fi + fi # The combo of gcc + glibc has a bug related # to inlining of functions like strtod(). The |