summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
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 /unix/tcl.m4
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]
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m425
1 files changed, 21 insertions, 4 deletions
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