summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2008-04-01 20:08:20 (GMT)
committerandreas_kupries <akupries@shaw.ca>2008-04-01 20:08:20 (GMT)
commitcd8055c7353838a9624308ed822c450b18d15d4a (patch)
tree1bd55d927a9ce487de1ddf46035603d5dc5e6721 /unix
parent00989310d72fd83734600742be9a06dae2ebe48b (diff)
downloadtcl-cd8055c7353838a9624308ed822c450b18d15d4a.zip
tcl-cd8055c7353838a9624308ed822c450b18d15d4a.tar.gz
tcl-cd8055c7353838a9624308ed822c450b18d15d4a.tar.bz2
* generic/tclStrToD.c: Applied patch for [Bug 1839067] (fp
* unix/tcl.m4: rounding setup on solaris x86, native cc), provided by Michael Schlenker.
Diffstat (limited to 'unix')
-rw-r--r--unix/tcl.m423
1 files changed, 21 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 0b69ba0..1550ab0 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1931,6 +1931,24 @@ dnl AC_CHECK_TOOL(AR, ar)
], [AC_MSG_WARN([64bit mode not supported for $arch])])])
])
+ #--------------------------------------------------------------------
+ # On Solaris 5.x i386 with the sunpro compiler we need to link
+ # with sunmath to get floating point rounding control
+ #--------------------------------------------------------------------
+ AS_IF([test "$GCC" = yes],[use_sunmath=no],[
+ arch=`isainfo`
+ AC_MSG_CHECKING([whether to use -lsunmath for fp rounding control])
+ AS_IF([test "$arch" = "amd64 i386"], [
+ AC_MSG_RESULT([yes])
+ MATH_LIBS="-lsunmath $MATH_LIBS"
+ AC_CHECK_HEADER(sunmath.h)
+ use_sunmath=yes
+ ], [
+ AC_MSG_RESULT([no])
+ use_sunmath=no
+ ])
+ ])
+
# Note: need the LIBS below, otherwise Tk won't find Tcl's
# symbols when dynamically loaded into tclsh.
@@ -1952,11 +1970,12 @@ dnl AC_CHECK_TOOL(AR, ar)
#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
])
], [
+ AS_IF([test "$use_sunmath" = yes], [textmode=textoff],[textmode=text])
case $system in
SunOS-5.[[1-9]][[0-9]]*)
- SHLIB_LD='${CC} -G -z text ${LDFLAGS}';;
+ SHLIB_LD="${CC} -G -z $textmode \${LDFLAGS}";;
*)
- SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
+ SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";;
esac
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'