Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f7bfa512cb2c6d0258dadeaf33659244fe75c317
Ticket: 1839067fffffffffffffffffffffffffffffffff
fp rounding setup on opensolaris x86
User & Date: gsyoungblood on 2009-01-06 04:59:08
Changes

  1. icomment:
    Ran into what I believe is a related problem when attempting to compile using Sun Studio Express 2008-11 on Solaris 10u6 32-bit Intel. 
    
    Compiling would fail with undefined symbol ieee_flags in libtcl8.5.so. Further digging revealed that the check whether or not to use -lsunmath for fp rounding control was returning negative, causing -lsunmath not to be added to MATH_LIBS. The problem appeared to be the use of a list (amd64 i386) when testing arch. Changing it to test each arch individually appeared to resolve the problem. Assuming this is correct, there's a similar test for sparc (sparcv9 sparc) that may need tweaking too.
    
    The following patch allows it to compile:
    diff -bur tcl8.5.6/unix/configure tcl8.5.6-solaris/unix/configure
    --- tcl8.5.6/unix/configure     Mon Dec 22 07:16:08 2008
    +++ tcl8.5.6-solaris/unix/configure     Mon Jan  5 14:36:32 2009
    @@ -8417,7 +8417,7 @@
    
    
     else
    -  if test "$arch" = "amd64 i386"; then
    +  if test "$arch" = "amd64" -o "$arch" = "i386" ; then
    
                        if test "$GCC" = yes; then
    
    @@ -8468,7 +8468,7 @@
                    arch=`isainfo`
                    echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5
     echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6
    -               if test "$arch" = "amd64 i386"; then
    +               if test "$arch" = "amd64" -o "$arch" = "i386" ; then
    
                            echo "$as_me:$LINENO: result: yes" >&5
     echo "${ECHO_T}yes" >&6
    @@ -8651,7 +8651,7 @@
                            #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
    
     else
    -  if test "$arch" = "amd64 i386"; then
    +  if test "$arch" = "amd64" -o "$arch" = "i386" ; then
    
                            SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
    
    diff -bur tcl8.5.6/unix/tcl.m4 tcl8.5.6-solaris/unix/tcl.m4
    --- tcl8.5.6/unix/tcl.m4        Mon Dec 22 07:16:08 2008
    +++ tcl8.5.6-solaris/unix/tcl.m4        Mon Jan  5 14:35:08 2009
    @@ -1916,7 +1916,7 @@
                            # Solaris 64 uses this as well
                            #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
                        ])
    -               ], [AS_IF([test "$arch" = "amd64 i386"], [
    +               ], [AS_IF([test "$arch" = "amd64" -o "$arch" = "i386"], [
                        AS_IF([test "$GCC" = yes], [
                            case $system in
                                SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
    @@ -1947,7 +1947,7 @@
                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"], [
    +               AS_IF([test "$arch" = "amd64" -o "$arch" = "i386"], [
                            AC_MSG_RESULT([yes])
                            MATH_LIBS="-lsunmath $MATH_LIBS"
                            AC_CHECK_HEADER(sunmath.h)
    @@ -1978,7 +1978,7 @@
                            # path, remove so name and append 'sparcv9'
                            #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
                            #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
    -                   ], [AS_IF([test "$arch" = "amd64 i386"], [
    +                   ], [AS_IF([test "$arch" = "amd64" -o "$arch" = "i386"], [
                            SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
                        ])])
                    ])
    
    
    
  2. login: "gsyoungblood"
  3. mimetype: "text/plain"
  4. username: "gsyoungblood"