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
20f36478
Commit
20f36478
authored
12 years ago
by
Shenghou Ma
Committed by
Ian Lance Taylor
12 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gospec.c: pass -u pthread_create to linker when static linking.
From-SVN: r195244
parent
d0b6bb1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
gcc/go/ChangeLog
+4
-0
gcc/go/gospec.c
+15
-1
No files found.
gcc/go/ChangeLog
View file @
20f36478
2013-01-16 Shenghou Ma <minux.ma@gmail.com>
* gospec.c: pass -u pthread_create to linker when static linking.
2012-12-21 Ian Lance Taylor <iant@google.com>
PR bootstrap/54659
...
...
This diff is collapsed.
Click to expand it.
gcc/go/gospec.c
View file @
20f36478
...
...
@@ -227,7 +227,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
#endif
/* Make sure to have room for the trailing NULL argument. */
num_args
=
argc
+
need_math
+
shared_libgcc
+
(
library
>
0
)
*
5
+
5
;
num_args
=
argc
+
need_math
+
shared_libgcc
+
(
library
>
0
)
*
5
+
10
;
new_decoded_options
=
XNEWVEC
(
struct
cl_decoded_option
,
num_args
);
i
=
0
;
...
...
@@ -381,6 +381,20 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
generate_option
(
OPT_shared_libgcc
,
NULL
,
1
,
CL_DRIVER
,
&
new_decoded_options
[
j
++
]);
#ifdef TARGET_CAN_SPLIT_STACK
/* libgcc wraps pthread_create to support split stack, however, due to
relative ordering of -lpthread and -lgcc, we can't just mark
__real_pthread_create in libgcc as non-weak. But we need to link in
pthread_create from pthread if we are statically linking, so we work-
around by passing -u pthread_create to to the linker. */
if
(
static_link
)
{
generate_option
(
OPT_Wl_
,
"-u,pthread_create"
,
1
,
CL_DRIVER
,
&
new_decoded_options
[
j
]);
j
++
;
}
#endif
*
in_decoded_options_count
=
j
;
*
in_decoded_options
=
new_decoded_options
;
*
in_added_libraries
=
added_libraries
;
...
...
This diff is collapsed.
Click to expand it.
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