Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ca59d219
Commit
ca59d219
authored
Feb 15, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: Support broken makecontext on Solaris 8/9.
From Rainer Orth. From-SVN: r184289
parent
a0367cc1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
0 deletions
+41
-0
libgo/config.h.in
+3
-0
libgo/configure
+17
-0
libgo/configure.ac
+18
-0
libgo/runtime/proc.c
+3
-0
No files found.
libgo/config.h.in
View file @
ca59d219
...
...
@@ -182,6 +182,9 @@
*/
#undef LT_OBJDIR
/* Define if makecontext expects top of stack in uc_stack. */
#undef MAKECONTEXT_STACK_TOP
/* Name of package */
#undef PACKAGE
...
...
libgo/configure
View file @
ca59d219
...
...
@@ -14873,6 +14873,20 @@ $as_echo "#define HAVE_STRUCT_EXCEPTION 1" >>confdefs.h
fi
case
"
$target
"
in
sparc
*
-
*
-solaris2
.[89]
*
)
libgo_cv_lib_makecontext_stack_top
=
yes
;;
*
)
libgo_cv_lib_makecontext_stack_top
=
no
;;
esac
if
test
"
$libgo_cv_lib_makecontext_stack_top
"
=
"yes"
;
then
$as_echo
"#define MAKECONTEXT_STACK_TOP 1"
>>
confdefs.h
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether setcontext clobbers TLS variables"
>
&5
$as_echo_n
"checking whether setcontext clobbers TLS variables... "
>
&6
;
}
if
test
"
${
libgo_cv_lib_setcontext_clobbers_tls
+set
}
"
=
set
;
then
:
...
...
@@ -14974,6 +14988,9 @@ main ()
abort ();
c.uc_stack.ss_sp = stack;
#ifdef MAKECONTEXT_STACK_TOP
c.uc_stack.ss_sp += sizeof stack;
#endif
c.uc_stack.ss_flags = 0;
c.uc_stack.ss_size = sizeof stack;
c.uc_link = NULL;
...
...
libgo/configure.ac
View file @
ca59d219
...
...
@@ -611,6 +611,21 @@ if test "$libgo_has_struct_exception" = "yes"; then
[Define to 1 if <math.h> defines struct exception])
fi
dnl Check if makecontext expects the uc_stack member of ucontext to point
dnl to the top of the stack.
case "$target" in
sparc*-*-solaris2.[[89]]*)
libgo_cv_lib_makecontext_stack_top=yes
;;
*)
libgo_cv_lib_makecontext_stack_top=no
;;
esac
if test "$libgo_cv_lib_makecontext_stack_top" = "yes"; then
AC_DEFINE(MAKECONTEXT_STACK_TOP, 1,
[Define if makecontext expects top of stack in uc_stack.])
fi
dnl See whether setcontext changes the value of TLS variables.
AC_CACHE_CHECK([whether setcontext clobbers TLS variables],
[libgo_cv_lib_setcontext_clobbers_tls],
...
...
@@ -667,6 +682,9 @@ main ()
abort ();
c.uc_stack.ss_sp = stack;
#ifdef MAKECONTEXT_STACK_TOP
c.uc_stack.ss_sp += sizeof stack;
#endif
c.uc_stack.ss_flags = 0;
c.uc_stack.ss_size = sizeof stack;
c.uc_link = NULL;
...
...
libgo/runtime/proc.c
View file @
ca59d219
...
...
@@ -1316,6 +1316,9 @@ __go_go(void (*fn)(void*), void* arg)
getcontext
(
&
newg
->
context
);
newg
->
context
.
uc_stack
.
ss_sp
=
sp
;
#ifdef MAKECONTEXT_STACK_TOP
newg
->
context
.
uc_stack
.
ss_sp
+=
spsize
;
#endif
newg
->
context
.
uc_stack
.
ss_size
=
spsize
;
makecontext
(
&
newg
->
context
,
kickoff
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment