Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d97e5443
Commit
d97e5443
authored
Apr 28, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Add support for -fno-PIC.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
64291938
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
winegcc.c
tools/winegcc/winegcc.c
+11
-2
No files found.
tools/winegcc/winegcc.c
View file @
d97e5443
...
...
@@ -208,6 +208,7 @@ struct options
int
wine_builtin
;
int
unwind_tables
;
int
strip
;
int
pic
;
const
char
*
wine_objdir
;
const
char
*
output_name
;
const
char
*
image_base
;
...
...
@@ -684,7 +685,10 @@ static void compile(struct options* opts, const char* lang)
strarray_add
(
comp_args
,
"-DWINE_UNICODE_NATIVE"
);
}
strarray_add
(
comp_args
,
"-D_REENTRANT"
);
strarray_add
(
comp_args
,
"-fPIC"
);
if
(
opts
->
pic
)
strarray_add
(
comp_args
,
"-fPIC"
);
else
strarray_add
(
comp_args
,
"-fno-PIC"
);
}
if
(
opts
->
target_cpu
==
CPU_x86_64
||
opts
->
target_cpu
==
CPU_ARM64
)
...
...
@@ -1026,7 +1030,7 @@ static void build(struct options* opts)
if
(
opts
->
force_pointer_size
)
strarray_add
(
spec_args
,
strmake
(
"-m%u"
,
8
*
opts
->
force_pointer_size
));
strarray_add
(
spec_args
,
"-D_REENTRANT"
);
strarray_add
(
spec_args
,
"-fPIC"
);
if
(
opts
->
pic
&&
!
is_pe
)
strarray_add
(
spec_args
,
"-fPIC"
);
strarray_add
(
spec_args
,
opts
->
shared
?
"--dll"
:
"--exe"
);
if
(
fake_module
)
{
...
...
@@ -1345,6 +1349,7 @@ int main(int argc, char **argv)
opts
.
linker_args
=
strarray_alloc
();
opts
.
compiler_args
=
strarray_alloc
();
opts
.
winebuild_args
=
strarray_alloc
();
opts
.
pic
=
1
;
/* determine the processor type */
if
(
strendswith
(
argv
[
0
],
"winecpp"
))
opts
.
processor
=
proc_cpp
;
...
...
@@ -1466,6 +1471,10 @@ int main(int argc, char **argv)
opts
.
unwind_tables
=
1
;
else
if
(
!
strcmp
(
"-fno-asynchronous-unwind-tables"
,
argv
[
i
]))
opts
.
unwind_tables
=
0
;
else
if
(
!
strcmp
(
"-fPIC"
,
argv
[
i
])
||
!
strcmp
(
"-fpic"
,
argv
[
i
]))
opts
.
pic
=
1
;
else
if
(
!
strcmp
(
"-fno-PIC"
,
argv
[
i
])
||
!
strcmp
(
"-fno-pic"
,
argv
[
i
]))
opts
.
pic
=
0
;
break
;
case
'l'
:
strarray_add
(
opts
.
files
,
strmake
(
"-l%s"
,
option_arg
));
...
...
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