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
44072af5
Commit
44072af5
authored
Jun 05, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: Fix call to _dl_get_tls_static_info for i386.
From-SVN: r188230
parent
70b9f516
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
3 deletions
+31
-3
libgo/config.h.in
+3
-0
libgo/configure
+1
-1
libgo/configure.ac
+1
-1
libgo/runtime/proc.c
+26
-1
No files found.
libgo/config.h.in
View file @
44072af5
...
...
@@ -286,6 +286,9 @@
/* Define to 1 if you have the `wait4' function. */
#undef HAVE_WAIT4
/* Define to 1 if you have the `_dl_get_tls_static_info' function. */
#undef HAVE__DL_GET_TLS_STATIC_INFO
/* Define if the C++ compiler is configured for setjmp/longjmp exceptions. */
#undef LIBGO_SJLJ_EXCEPTIONS
...
...
libgo/configure
View file @
44072af5
...
...
@@ -14584,7 +14584,7 @@ else
fi
for
ac_func
in
strerror_r strsignal wait4 mincore setenv
for
ac_func
in
strerror_r strsignal wait4 mincore setenv
_dl_get_tls_static_info
do
:
as_ac_var
=
`
$as_echo
"ac_cv_func_
$ac_func
"
|
$as_tr_sh
`
ac_fn_c_check_func
"
$LINENO
"
"
$ac_func
"
"
$as_ac_var
"
...
...
libgo/configure.ac
View file @
44072af5
...
...
@@ -481,7 +481,7 @@ fi
AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes)
AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv)
AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv
_dl_get_tls_static_info
)
AM_CONDITIONAL(HAVE_STRERROR_R, test "$ac_cv_func_strerror_r" = yes)
AM_CONDITIONAL(HAVE_WAIT4, test "$ac_cv_func_wait4" = yes)
...
...
libgo/runtime/proc.c
View file @
44072af5
...
...
@@ -1105,6 +1105,7 @@ runtime_newm(void)
M
*
m
;
pthread_attr_t
attr
;
pthread_t
tid
;
size_t
stacksize
;
m
=
runtime_malloc
(
sizeof
(
M
));
mcommoninit
(
m
);
...
...
@@ -1118,7 +1119,31 @@ runtime_newm(void)
#ifndef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 8192
#endif
if
(
pthread_attr_setstacksize
(
&
attr
,
PTHREAD_STACK_MIN
)
!=
0
)
stacksize
=
PTHREAD_STACK_MIN
;
#ifdef HAVE__DL_GET_TLS_STATIC_INFO
{
/* On GNU/Linux the static TLS size is taken out of
the stack size, and we get an error or a crash if
there is not enough stack space left. Add it back
in if we can, in case the program uses a lot of TLS
space. */
#ifndef internal_function
#ifdef __i386__
#define internal_function __attribute__ ((regparm (3), stdcall))
#else
#define internal_function
#endif
#endif
extern
void
_dl_get_tls_static_info
(
size_t
*
,
size_t
*
)
internal_function
;
size_t
tlssize
,
tlsalign
;
_dl_get_tls_static_info
(
&
tlssize
,
&
tlsalign
);
stacksize
+=
tlssize
;
}
#endif
if
(
pthread_attr_setstacksize
(
&
attr
,
stacksize
)
!=
0
)
runtime_throw
(
"pthread_attr_setstacksize"
);
if
(
pthread_create
(
&
tid
,
&
attr
,
runtime_mstart
,
m
)
!=
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