From 70635f1e0498a195a36e1b49521bbac05fc9a363 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 27 Apr 2000 02:43:33 +0200 Subject: <<<<<<< ChangeLog 2000-04-26 Jakub Jelinek * gcconfig.h (SPARC): Define ALIGNMENT to 8 for 64bit SPARC. (SPARC/LINUX): Use GC_SysVGetDataStart instead of LINUX_DATA_START - sparc glibc does not provide it. (SAVE_CALL_CHAIN, ASM_CLEAR_CODE): Define on sparc*-linux*. Make STACKBOTTOM depend on the wordsize. * os_dep.c (GC_SysVGetDataStart): Compile in on sparc*-linux*. (struct frame): Declare on sparc*-linux*. (GC_save_callers): Bias the frame pointers if needed (sparc64). * mach_dep.c (GC_save_regs_in_stack): Optimize on sparc32. Implement on sparc64. (GC_clear_stack_inner): Implement on sparc64. * gc_priv.h (GC_test_and_set): Implement for sparc. * linux_threads.c (GC_suspend_handler, GC_push_all_stacks): Use From-SVN: r33452 --- boehm-gc/ChangeLog | 18 ++++++ boehm-gc/Makefile.in | 2 - boehm-gc/aclocal.m4 | 13 +++-- boehm-gc/configure | 140 +++++++++++++++++++++++++---------------------- boehm-gc/gc_priv.h | 12 +++- boehm-gc/gcconfig.h | 25 ++++++--- boehm-gc/linux_threads.c | 12 +++- boehm-gc/mach_dep.c | 26 ++++++++- boehm-gc/os_dep.c | 60 +++++++++++++------- 9 files changed, 206 insertions(+), 102 deletions(-) (limited to 'boehm-gc') diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 08eb52b..c2aa927 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,21 @@ +<<<<<<< ChangeLog +2000-04-26 Jakub Jelinek + + * gcconfig.h (SPARC): Define ALIGNMENT to 8 for 64bit SPARC. + (SPARC/LINUX): Use GC_SysVGetDataStart instead of LINUX_DATA_START + - sparc glibc does not provide it. + (SAVE_CALL_CHAIN, ASM_CLEAR_CODE): Define on sparc*-linux*. + Make STACKBOTTOM depend on the wordsize. + * os_dep.c (GC_SysVGetDataStart): Compile in on sparc*-linux*. + (struct frame): Declare on sparc*-linux*. + (GC_save_callers): Bias the frame pointers if needed (sparc64). + * mach_dep.c (GC_save_regs_in_stack): Optimize on sparc32. + Implement on sparc64. + (GC_clear_stack_inner): Implement on sparc64. + * gc_priv.h (GC_test_and_set): Implement for sparc. + * linux_threads.c (GC_suspend_handler, GC_push_all_stacks): Use + GC_save_regs_in_stack on sparc. + 2000-04-23 Tom Tromey * gcconfig.h (DYNAMIC_LOADING): Define for PPC Linux. diff --git a/boehm-gc/Makefile.in b/boehm-gc/Makefile.in index fb671a9..9ea3aa4 100644 --- a/boehm-gc/Makefile.in +++ b/boehm-gc/Makefile.in @@ -74,13 +74,11 @@ CXXINCLUDES = @CXXINCLUDES@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ INCLUDES = @INCLUDES@ -LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MY_CFLAGS = @MY_CFLAGS@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ diff --git a/boehm-gc/aclocal.m4 b/boehm-gc/aclocal.m4 index 6510bcd..879db96 100644 --- a/boehm-gc/aclocal.m4 +++ b/boehm-gc/aclocal.m4 @@ -307,7 +307,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ || AC_MSG_ERROR([libtool configure failed]) # Reload cache, that may have been modified by ltconfig @@ -339,6 +339,11 @@ AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" @@ -357,7 +362,7 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$host" in +case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext @@ -573,7 +578,6 @@ else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_SUBST(LD) AC_PROG_LD_GNU ]) @@ -619,14 +623,13 @@ else fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) -AC_SUBST(NM) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= -case "$host" in +case "$lt_target" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; diff --git a/boehm-gc/configure b/boehm-gc/configure index b63d4e8..5f3ab65 100755 --- a/boehm-gc/configure +++ b/boehm-gc/configure @@ -57,6 +57,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -171,6 +172,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -341,6 +343,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -506,12 +513,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -599,7 +610,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:603: checking host system type" >&5 +echo "configure:614: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -620,7 +631,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:624: checking target system type" >&5 +echo "configure:635: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -638,7 +649,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:642: checking build system type" >&5 +echo "configure:653: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -673,7 +684,7 @@ test "$host_alias" != "$target_alias" && # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:677: checking for a BSD compatible install" >&5 +echo "configure:688: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -726,7 +737,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:730: checking whether build environment is sane" >&5 +echo "configure:741: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -783,7 +794,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:787: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:798: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -816,12 +827,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:820: checking for Cygwin environment" >&5 +echo "configure:831: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -849,19 +860,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:853: checking for mingw32 environment" >&5 +echo "configure:864: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -909,7 +920,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:913: checking host system type" >&5 +echo "configure:924: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -933,7 +944,7 @@ echo "$ac_t""$host" 1>&6 PACKAGE=boehm-gc -VERSION=5.0a4 +VERSION=5.0a6 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -943,7 +954,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:947: checking for working aclocal" >&5 +echo "configure:958: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -956,7 +967,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:960: checking for working autoconf" >&5 +echo "configure:971: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -969,7 +980,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:973: checking for working automake" >&5 +echo "configure:984: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -982,7 +993,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:986: checking for working autoheader" >&5 +echo "configure:997: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -995,7 +1006,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:999: checking for working makeinfo" >&5 +echo "configure:1010: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1021,7 +1032,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1025: checking for $ac_word" >&5 +echo "configure:1036: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1051,7 +1062,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1055: checking for $ac_word" >&5 +echo "configure:1066: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1100,7 +1111,7 @@ fi fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1104: checking whether we are using GNU C" >&5 +echo "configure:1115: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1109,7 +1120,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1124,7 +1135,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1128: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1139: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1161,7 +1172,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1165: checking for $ac_word" >&5 +echo "configure:1176: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1194,7 +1205,7 @@ test -n "$CXX" || CXX="gcc" test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1198: checking whether we are using GNU C++" >&5 +echo "configure:1209: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1203,7 +1214,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1218,7 +1229,7 @@ if test $ac_cv_prog_gxx = yes; then ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1222: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1233: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1251,7 +1262,7 @@ fi # NEWLIB_CONFIGURE, which doesn't work because that means that it will # be run before AC_CANONICAL_HOST. echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1255: checking build system type" >&5 +echo "configure:1266: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1272,7 +1283,7 @@ echo "$ac_t""$build" 1>&6 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1276: checking for $ac_word" >&5 +echo "configure:1287: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1304,7 +1315,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1308: checking for $ac_word" >&5 +echo "configure:1319: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1336,7 +1347,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1340: checking for $ac_word" >&5 +echo "configure:1351: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1368,7 +1379,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1372: checking for $ac_word" >&5 +echo "configure:1383: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1413,7 +1424,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1417: checking for a BSD compatible install" >&5 +echo "configure:1428: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1467,7 +1478,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1471: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:1482: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -1501,7 +1512,7 @@ if false; then echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1505: checking for executable suffix" >&5 +echo "configure:1516: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1511,7 +1522,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -1625,7 +1636,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1629: checking for $ac_word" >&5 +echo "configure:1640: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1664,7 +1675,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1668: checking for ld used by GCC" >&5 +echo "configure:1679: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1688,10 +1699,10 @@ echo "configure:1668: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1692: checking for GNU ld" >&5 +echo "configure:1703: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1695: checking for non-GNU ld" >&5 +echo "configure:1706: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1725,9 +1736,8 @@ else echo "$ac_t""no" 1>&6 fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1731: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1741: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1743,7 +1753,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1747: checking for BSD-compatible nm" >&5 +echo "configure:1757: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1778,9 +1788,8 @@ fi NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1784: checking whether ln -s works" >&5 +echo "configure:1793: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1801,6 +1810,11 @@ else fi +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" @@ -1821,11 +1835,11 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$host" in +case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1828 "configure"' > conftest.$ac_ext - if { (eval echo configure:1829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1842 "configure"' > conftest.$ac_ext + if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1846,19 +1860,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1850: checking whether the C compiler needs -belf" >&5 +echo "configure:1864: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1936,7 +1950,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig @@ -1974,7 +1988,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1978: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:1992: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2003,7 +2017,7 @@ if test "x" = "y"; then echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2007: checking for executable suffix" >&5 +echo "configure:2021: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2013,7 +2027,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -2036,7 +2050,7 @@ ac_exeext=$EXEEXT fi echo $ac_n "checking for threads package to use""... $ac_c" 1>&6 -echo "configure:2040: checking for threads package to use" >&5 +echo "configure:2054: checking for threads package to use" >&5 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" @@ -2458,8 +2472,6 @@ s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g s%@EXEEXT@%$EXEEXT%g s%@BOEHM_GC_CFLAGS@%$BOEHM_GC_CFLAGS%g -s%@LD@%$LD%g -s%@NM@%$NM%g s%@LN_S@%$LN_S%g s%@LIBTOOL@%$LIBTOOL%g s%@THREADLIB@%$THREADLIB%g diff --git a/boehm-gc/gc_priv.h b/boehm-gc/gc_priv.h index a4312b1..f26d485 100644 --- a/boehm-gc/gc_priv.h +++ b/boehm-gc/gc_priv.h @@ -439,7 +439,7 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */); # endif # if defined(LINUX_THREADS) # if defined(I386)|| defined(POWERPC) || defined(ALPHA) || defined(IA64) \ - || defined(M68K) + || defined(M68K) || defined(SPARC) # include # define USE_SPIN_LOCK # if defined(I386) @@ -465,6 +465,16 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */); } # define GC_CLEAR_DEFINED # endif +# ifdef SPARC + inline static int GC_test_and_set(volatile unsigned int *addr) { + int oldval; + + __asm__ __volatile__("ldstub %1,%0" + : "=r"(oldval), "=m"(*addr) + : "m"(*addr)); + return oldval; + } +# endif # ifdef M68K /* Contributed by Tony Mantler. I'm not sure how well it was */ /* tested. */ diff --git a/boehm-gc/gcconfig.h b/boehm-gc/gcconfig.h index f239071..49b0fb0 100644 --- a/boehm-gc/gcconfig.h +++ b/boehm-gc/gcconfig.h @@ -326,8 +326,8 @@ /* RT ==> IBM PC/RT */ /* HP_PA ==> HP9000/700 & /800 */ /* HP/UX */ - /* SPARC ==> SPARC under SunOS */ - /* (SUNOS4, SUNOS5, */ + /* SPARC ==> SPARC v7/v8/v9 */ + /* (SUNOS4, SUNOS5, LINUX, */ /* DRSNX variants) */ /* ALPHA ==> DEC Alpha */ /* (OSF1 and LINUX variants) */ @@ -595,7 +595,11 @@ # ifdef SPARC # define MACH_TYPE "SPARC" -# define ALIGNMENT 4 /* Required by hardware */ +# if defined(__arch64__) || defined(__sparcv9) +# define ALIGNMENT 8 +# else +# define ALIGNMENT 4 /* Required by hardware */ +# endif # define ALIGN_DOUBLE extern int etext; # ifdef SUNOS5 @@ -656,15 +660,22 @@ # ifdef LINUX # define OS_TYPE "LINUX" # ifdef __ELF__ -# define LINUX_DATA_START # define DYNAMIC_LOADING # else - Linux Sparc non elf ? + Linux Sparc/a.out not supported # endif + extern int _etext; extern int _end; # define DATAEND (&_end) # define SVR4 -# define STACKBOTTOM ((ptr_t) 0xf0000000) +# ifdef __arch64__ +# define STACKBOTTOM ((ptr_t) 0x80000000000ULL) +# define DATASTART (ptr_t)GC_SysVGetDataStart(0x100000, &_etext) +# define CPP_WORDSZ 64 +# else +# define STACKBOTTOM ((ptr_t) 0xf0000000) +# define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &_etext) +# endif # endif # ifdef OPENBSD # define OS_TYPE "OPENBSD" @@ -1331,7 +1342,7 @@ /* Use setjmp based hack to mark from callee-save registers. */ # define USE_GENERIC_PUSH_REGS # endif -# if defined(SPARC) && !defined(LINUX) +# if defined(SPARC) # define SAVE_CALL_CHAIN # define ASM_CLEAR_CODE /* Stack clearing is crucial, and we */ /* include assembly code to do it well. */ diff --git a/boehm-gc/linux_threads.c b/boehm-gc/linux_threads.c index d6cab0a..c3f19b8 100644 --- a/boehm-gc/linux_threads.c +++ b/boehm-gc/linux_threads.c @@ -152,7 +152,7 @@ static inline ptr_t GC_linux_thread_top_of_stack(void) return tos; } -#ifdef IA64 +#if defined(SPARC) || defined(IA64) extern word GC_save_regs_in_stack(); #endif @@ -177,7 +177,11 @@ void GC_suspend_handler(int sig) /* of a thread which holds the allocation lock in order */ /* to stop the world. Thus concurrent modification of the */ /* data structure is impossible. */ - me -> stack_ptr = (ptr_t)(&dummy); +# ifdef SPARC + me -> stack_ptr = (ptr_t)GC_save_regs_in_stack(); +# else + me -> stack_ptr = (ptr_t)(&dummy); +# endif # ifdef IA64 me -> backing_store_ptr = (ptr_t)GC_save_regs_in_stack(); # endif @@ -425,7 +429,11 @@ void GC_push_all_stacks() for (p = GC_threads[i]; p != 0; p = p -> next) { if (p -> flags & FINISHED) continue; if (pthread_equal(p -> id, me)) { +# ifdef SPARC + lo = (ptr_t)GC_save_regs_in_stack(); +# else lo = GC_approx_sp(); +# endif IF_IA64(bs_hi = (ptr_t)GC_save_regs_in_stack();) } else { lo = p -> stack_ptr; diff --git a/boehm-gc/mach_dep.c b/boehm-gc/mach_dep.c index 12c3f07..2936fd7 100644 --- a/boehm-gc/mach_dep.c +++ b/boehm-gc/mach_dep.c @@ -437,10 +437,16 @@ ptr_t cold_gc_frame; asm(" .globl _GC_save_regs_in_stack"); asm("_GC_save_regs_in_stack:"); # endif +# if defined(__arch64__) || defined(__sparcv9) + asm(" save %sp,-128,%sp"); + asm(" flushw"); + asm(" ret"); + asm(" restore %sp,2047+128,%o0"); +# else asm(" ta 0x3 ! ST_FLUSH_WINDOWS"); - asm(" mov %sp,%o0"); asm(" retl"); - asm(" nop"); + asm(" mov %sp,%o0"); +#endif # ifdef SVR4 asm(" .GC_save_regs_in_stack_end:"); asm(" .size GC_save_regs_in_stack,.GC_save_regs_in_stack_end-GC_save_regs_in_stack"); @@ -488,6 +494,21 @@ ptr_t cold_gc_frame; asm("GC_clear_stack_inner:"); asm(".type GC_save_regs_in_stack,#function"); # endif +#if defined(__arch64__) || defined(__sparcv9) + asm("mov %sp,%o2"); /* Save sp */ + asm("add %sp,2047-8,%o3"); /* p = sp+bias-8 */ + asm("add %o1,-2047-192,%sp"); /* Move sp out of the way, */ + /* so that traps still work. */ + /* Includes some extra words */ + /* so we can be sloppy below. */ + asm("loop:"); + asm("stx %g0,[%o3]"); /* *(long *)p = 0 */ + asm("cmp %o3,%o1"); + asm("bgu,pt %xcc, loop"); /* if (p > limit) goto loop */ + asm("add %o3,-8,%o3"); /* p -= 8 (delay slot) */ + asm("retl"); + asm("mov %o2,%sp"); /* Restore sp., delay slot */ +#else asm("mov %sp,%o2"); /* Save sp */ asm("add %sp,-8,%o3"); /* p = sp-8 */ asm("clr %g1"); /* [g0,g1] = 0 */ @@ -502,6 +523,7 @@ ptr_t cold_gc_frame; asm("add %o3,-8,%o3"); /* p -= 8 (delay slot) */ asm("retl"); asm("mov %o2,%sp"); /* Restore sp., delay slot */ +#endif /* First argument = %o0 = return value */ # ifdef SVR4 asm(" .GC_clear_stack_inner_end:"); diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c index a972dec..76e909f 100644 --- a/boehm-gc/os_dep.c +++ b/boehm-gc/os_dep.c @@ -1064,7 +1064,8 @@ void GC_register_data_segments() # else -# if (defined(SVR4) || defined(AUX) || defined(DGUX)) && !defined(PCR) +# if (defined(SVR4) || defined(AUX) || defined(DGUX) \ + || (defined(LINUX) && defined(SPARC))) && !defined(PCR) char * GC_SysVGetDataStart(max_page_size, etext_addr) int max_page_size; int * etext_addr; @@ -2580,23 +2581,37 @@ struct hblk *h; * Call stack save code for debugging. * Should probably be in mach_dep.c, but that requires reorganization. */ -#if defined(SPARC) && !defined(LINUX) -# if defined(SUNOS4) -# include -# else -# if defined (DRSNX) -# include -# else -# if defined(OPENBSD) -# include -# else -# include -# endif -# endif -# endif -# if NARGS > 6 +#if defined(SPARC) +# if defined(LINUX) +struct frame { + long fr_local[8]; + long fr_arg[6]; + struct frame *fr_savfp; + long fr_savpc; +# ifndef __arch64__ + char *fr_stret; +# endif + long fr_argd[6]; + long fr_argx[0]; +}; +# else +# if defined(SUNOS4) +# include +# else +# if defined (DRSNX) +# include +# else +# if defined(OPENBSD) +# include +# else +# include +# endif +# endif +# endif +# endif +# if NARGS > 6 --> We only know how to to get the first 6 arguments -# endif +# endif #ifdef SAVE_CALL_CHAIN /* Fill in the pc and argument information for up to NFRAMES of my */ @@ -2610,6 +2625,12 @@ struct hblk *h; # define FR_SAVPC fr_savpc #endif +#if defined(SPARC) && (defined(__arch64__) || defined(__sparcv9)) +#define BIAS 2047 +#else +#define BIAS 0 +#endif + void GC_save_callers (info) struct callinfo info[NFRAMES]; { @@ -2620,8 +2641,9 @@ struct callinfo info[NFRAMES]; frame = (struct frame *) GC_save_regs_in_stack (); - for (fp = frame -> FR_SAVFP; fp != 0 && nframes < NFRAMES; - fp = fp -> FR_SAVFP, nframes++) { + for (fp = (struct frame *)((long) frame -> FR_SAVFP + BIAS); + fp != 0 && nframes < NFRAMES; + fp = (struct frame *)((long) fp -> FR_SAVFP + BIAS), nframes++) { register int i; info[nframes].ci_pc = fp->FR_SAVPC; -- cgit v1.1