Commit 9c383523 by Rainer Orth Committed by Rainer Orth

solaris_threads.c (MAX_ORIG_STACK_SIZE): Provide special Solaris 2/Intel definition.

	* solaris_threads.c (MAX_ORIG_STACK_SIZE) [I386]: Provide special
	Solaris 2/Intel definition.

	* configure.in (i?86-*-solaris2.[89]*): Define
	SOLARIS25_PROC_VDB_BUG_FIXED.
	* include/private/gcconfig.h [I386 && SUNOS5]: Use it.
	* configure: Regenerate.

	* include/private/gcconfig.h [I386 && SUNOS5] (DATASTART): Use _etext.
	(DATAEND): Define using _end.

From-SVN: r45825
parent 2e106602
2001-09-26 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* solaris_threads.c (MAX_ORIG_STACK_SIZE) [I386]: Provide special
Solaris 2/Intel definition.
* configure.in (i?86-*-solaris2.[89]*): Define
SOLARIS25_PROC_VDB_BUG_FIXED.
* include/private/gcconfig.h [I386 && SUNOS5]: Use it.
* configure: Regenerate.
* include/private/gcconfig.h [I386 && SUNOS5] (DATASTART): Use _etext.
(DATAEND): Define using _end.
2001-09-11 Per Bothner <per@bothner.com> 2001-09-11 Per Bothner <per@bothner.com>
* include/Makefile.am: New file. It defines include_HEADERS. * include/Makefile.am: New file. It defines include_HEADERS.
......
...@@ -2807,6 +2807,12 @@ case "$host" in ...@@ -2807,6 +2807,12 @@ case "$host" in
alpha*-*-*) alpha*-*-*)
machdep="alpha_mach_dep.lo" machdep="alpha_mach_dep.lo"
;; ;;
i?86-*-solaris2.[89]*)
cat >> confdefs.h <<\EOF
#define SOLARIS25_PROC_VDB_BUG_FIXED 1
EOF
;;
mipstx39-*-elf*) mipstx39-*-elf*)
machdep="mips_ultrix_mach_dep.lo" machdep="mips_ultrix_mach_dep.lo"
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
......
...@@ -153,6 +153,9 @@ case "$host" in ...@@ -153,6 +153,9 @@ case "$host" in
alpha*-*-*) alpha*-*-*)
machdep="alpha_mach_dep.lo" machdep="alpha_mach_dep.lo"
;; ;;
i?86-*-solaris2.[[89]]*)
AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
;;
mipstx39-*-elf*) mipstx39-*-elf*)
machdep="mips_ultrix_mach_dep.lo" machdep="mips_ultrix_mach_dep.lo"
AC_DEFINE(STACKBASE, __stackbase) AC_DEFINE(STACKBASE, __stackbase)
......
...@@ -838,9 +838,10 @@ ...@@ -838,9 +838,10 @@
# endif # endif
# ifdef SUNOS5 # ifdef SUNOS5
# define OS_TYPE "SUNOS5" # define OS_TYPE "SUNOS5"
extern int etext, _start; extern int _etext, _end;
extern char * GC_SysVGetDataStart(); extern char * GC_SysVGetDataStart();
# define DATASTART GC_SysVGetDataStart(0x1000, &etext) # define DATASTART GC_SysVGetDataStart(0x1000, &_etext)
# define DATAEND (&_end)
/* # define STACKBOTTOM ((ptr_t)(&_start)) worked through 2.7, */ /* # define STACKBOTTOM ((ptr_t)(&_start)) worked through 2.7, */
/* but reportedly breaks under 2.8. It appears that the stack */ /* but reportedly breaks under 2.8. It appears that the stack */
/* base is a property of the executable, so this should not break */ /* base is a property of the executable, so this should not break */
...@@ -849,7 +850,9 @@ ...@@ -849,7 +850,9 @@
# include <sys/vmparam.h> # include <sys/vmparam.h>
# define STACKBOTTOM USRSTACK # define STACKBOTTOM USRSTACK
/** At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */ /** At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */
/*# define PROC_VDB*/ # ifdef SOLARIS25_PROC_VDB_BUG_FIXED
# define PROC_VDB
# endif
# define DYNAMIC_LOADING # define DYNAMIC_LOADING
# ifndef USE_MMAP # ifndef USE_MMAP
# define USE_MMAP # define USE_MMAP
......
...@@ -621,7 +621,18 @@ GC_thread GC_lookup_thread(thread_t id) ...@@ -621,7 +621,18 @@ GC_thread GC_lookup_thread(thread_t id)
return(p); return(p);
} }
/* Solaris 2/Intel uses an initial stack size limit slightly bigger than the
SPARC default of 8 MB. Account for this to warn only if the user has
raised the limit beyond the default.
This is identical to DFLSSIZ defined in <sys/vm_machparam.h>. This file
is installed in /usr/platform/`uname -m`/include, which is not in the
default include directory list, so copy the definition here. */
#ifdef I386
# define MAX_ORIG_STACK_SIZE (8 * 1024 * 1024 + ((USRSTACK) & 0x3FFFFF))
#else
# define MAX_ORIG_STACK_SIZE (8 * 1024 * 1024) # define MAX_ORIG_STACK_SIZE (8 * 1024 * 1024)
#endif
word GC_get_orig_stack_size() { word GC_get_orig_stack_size() {
struct rlimit rl; struct rlimit rl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment