summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-01-29 02:15:49 (GMT)
committerhobbs <hobbs>2005-01-29 02:15:49 (GMT)
commit46d71e8de0a65f1856b0ca9201420ba435bf92a7 (patch)
tree2f354aa1af44359eca3ad3f3c135afa735251027
parente54506c166bdadcc0f3e5d2b2ff50547ca772565 (diff)
downloadtcl-46d71e8de0a65f1856b0ca9201420ba435bf92a7.zip
tcl-46d71e8de0a65f1856b0ca9201420ba435bf92a7.tar.gz
tcl-46d71e8de0a65f1856b0ca9201420ba435bf92a7.tar.bz2
* unix/configure, unix/tcl.m4: add solaris 64-bit gcc build
support. [Bug 1021871]
-rw-r--r--ChangeLog5
-rwxr-xr-xunix/configure29
-rw-r--r--unix/tcl.m425
3 files changed, 49 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index c8a25c1..987e2ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-28 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * unix/configure, unix/tcl.m4: add solaris 64-bit gcc build
+ support. [Bug 1021871]
+
2005-01-28 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* tests/expr-old.test (expr-old-37.2): Added test for [Bug 1109484]
diff --git a/unix/configure b/unix/configure
index 87d9544..7c83a25 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7514,8 +7514,16 @@ _ACEOF
arch=`isainfo`
if test "$arch" = "sparcv9 sparc" ; then
if test "$GCC" = "yes" ; then
- { echo "$as_me:$LINENO: WARNING: \"64bit mode not supported with GCC on $system\"" >&5
-echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;}
+ if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
+echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -m64 -mcpu=v9"
+ LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_FLAGS=""
+ fi
else
do64bit_ok=yes
if test "$do64bitVIS" = "yes" ; then
@@ -7527,8 +7535,8 @@ echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;}
fi
fi
else
- { echo "$as_me:$LINENO: WARNING: \"64bit mode only supported sparcv9 system\"" >&5
-echo "$as_me: WARNING: \"64bit mode only supported sparcv9 system\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: 64bit mode only supported sparcv9 system" >&5
+echo "$as_me: WARNING: 64bit mode only supported sparcv9 system" >&2;}
fi
fi
@@ -7543,6 +7551,15 @@ echo "$as_me: WARNING: \"64bit mode only supported sparcv9 system\"" >&2;}
SHLIB_LD="$CC -shared"
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ if test "$do64bit_ok" = "yes" ; then
+ # We need to specify -static-libgcc or we need to
+ # add the path to the sparv9 libgcc.
+ SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
+ # for finding sparcv9 libgcc, get the regular libgcc
+ # path, remove so name and append 'sparcv9'
+ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
+ #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+ fi
else
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
@@ -7620,8 +7637,8 @@ echo "${ECHO_T}$found" >&6
esac
if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
- { echo "$as_me:$LINENO: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&5
-echo "$as_me: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
+echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
fi
if test "$do64bit" = "yes" -a "$do64bit_ok" = "yes" ; then
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 94bf885..b7ad5d9 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1596,13 +1596,21 @@ dnl AC_CHECK_TOOL(AR, ar)
[Do we really want to follow the standard? Yes we do!])
SHLIB_CFLAGS="-KPIC"
-
+
# Check to enable 64-bit flags for compiler/linker
if test "$do64bit" = "yes" ; then
arch=`isainfo`
if test "$arch" = "sparcv9 sparc" ; then
if test "$GCC" = "yes" ; then
- AC_MSG_WARN("64bit mode not supported with GCC on $system")
+ if test "`gcc -dumpversion | awk -F. '{print [$]1}'`" -lt "3" ; then
+ AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -m64 -mcpu=v9"
+ LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_FLAGS=""
+ fi
else
do64bit_ok=yes
if test "$do64bitVIS" = "yes" ; then
@@ -1614,7 +1622,7 @@ dnl AC_CHECK_TOOL(AR, ar)
fi
fi
else
- AC_MSG_WARN("64bit mode only supported sparcv9 system")
+ AC_MSG_WARN([64bit mode only supported sparcv9 system])
fi
fi
@@ -1629,6 +1637,15 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_LD="$CC -shared"
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ if test "$do64bit_ok" = "yes" ; then
+ # We need to specify -static-libgcc or we need to
+ # add the path to the sparv9 libgcc.
+ SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
+ # for finding sparcv9 libgcc, get the regular libgcc
+ # path, remove so name and append 'sparcv9'
+ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
+ #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+ fi
else
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
@@ -1670,7 +1687,7 @@ dnl AC_CHECK_TOOL(AR, ar)
esac
if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
- AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
+ AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
fi
if test "$do64bit" = "yes" -a "$do64bit_ok" = "yes" ; then