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
9ac2eecb
Commit
9ac2eecb
authored
Nov 18, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Support an explicit --fake-module option.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d969d02e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
winegcc.c
tools/winegcc/winegcc.c
+12
-9
No files found.
tools/winegcc/winegcc.c
View file @
9ac2eecb
...
...
@@ -179,6 +179,7 @@ struct options
int
force_pointer_size
;
int
large_address_aware
;
int
wine_builtin
;
int
fake_module
;
int
unwind_tables
;
int
strip
;
int
pic
;
...
...
@@ -1002,7 +1003,6 @@ static const char *build_spec_obj( struct options *opts, const char *spec_file,
struct
strarray
spec_args
=
get_winebuild_args
(
opts
);
struct
strarray
tool
;
const
char
*
spec_o_name
,
*
output_name
;
int
fake_module
=
strendswith
(
output_file
,
".fake"
);
/* get the filename from the path */
output_name
=
get_basename
(
output_file
);
...
...
@@ -1020,7 +1020,7 @@ static const char *build_spec_obj( struct options *opts, const char *spec_file,
strarray_add
(
&
spec_args
,
strmake
(
"-m%u"
,
8
*
opts
->
force_pointer_size
));
if
(
opts
->
pic
&&
!
is_pe
)
strarray_add
(
&
spec_args
,
"-fPIC"
);
strarray_add
(
&
spec_args
,
opts
->
shared
?
"--dll"
:
"--exe"
);
if
(
fake_module
)
if
(
opts
->
fake_module
)
{
strarray_add
(
&
spec_args
,
"--fake-module"
);
strarray_add
(
&
spec_args
,
"-o"
);
...
...
@@ -1101,7 +1101,6 @@ static void build(struct options* opts)
const
char
*
output_name
,
*
spec_file
,
*
lang
;
int
generate_app_loader
=
1
;
const
char
*
crt_lib
=
NULL
,
*
entry_point
=
NULL
;
int
fake_module
=
0
;
int
is_pe
=
is_pe_target
(
opts
);
unsigned
int
j
;
...
...
@@ -1128,7 +1127,7 @@ static void build(struct options* opts)
if
(
opts
->
shared
||
is_pe
||
strendswith
(
output_file
,
".so"
))
generate_app_loader
=
0
;
if
(
strendswith
(
output_file
,
".fake"
))
fake_module
=
1
;
if
(
strendswith
(
output_file
,
".fake"
))
opts
->
fake_module
=
1
;
/* normalize the filename a bit: strip .so, ensure it has proper ext */
if
(
!
strchr
(
get_basename
(
output_file
),
'.'
))
...
...
@@ -1250,7 +1249,7 @@ static void build(struct options* opts)
if
(
spec_file
||
!
opts
->
unix_lib
)
spec_o_name
=
build_spec_obj
(
opts
,
spec_file
,
output_file
,
files
,
lib_dirs
,
entry_point
);
if
(
fake_module
)
return
;
/* nothing else to do */
if
(
opts
->
fake_module
)
return
;
/* nothing else to do */
/* link everything together now */
link_args
=
get_link_args
(
opts
,
output_name
);
...
...
@@ -1880,9 +1879,13 @@ int main(int argc, char **argv)
}
else
if
(
strncmp
(
"-Wb,"
,
opts
.
args
.
str
[
i
],
4
)
==
0
)
{
strarray_addall
(
&
opts
.
winebuild_args
,
strarray_fromstring
(
opts
.
args
.
str
[
i
]
+
4
,
","
)
);
/* don't pass it to the compiler, it generates errors */
unsigned
int
j
;
struct
strarray
Wb
=
strarray_fromstring
(
opts
.
args
.
str
[
i
]
+
4
,
","
);
for
(
j
=
0
;
j
<
Wb
.
count
;
j
++
)
{
if
(
!
strcmp
(
Wb
.
str
[
j
],
"--fake-module"
))
opts
.
fake_module
=
1
;
else
strarray_add
(
&
opts
.
winebuild_args
,
Wb
.
str
[
j
]
);
}
raw_compiler_arg
=
raw_linker_arg
=
0
;
}
break
;
...
...
@@ -1958,7 +1961,7 @@ int main(int argc, char **argv)
if
(
!
opts
.
wine_objdir
&&
is_pe_target
(
&
opts
))
opts
.
use_msvcrt
=
1
;
if
(
opts
.
files
.
count
==
0
)
forward
(
&
opts
);
if
(
opts
.
files
.
count
==
0
&&
!
opts
.
fake_module
)
forward
(
&
opts
);
else
if
(
linking
)
build
(
&
opts
);
else
compile
(
&
opts
,
lang
);
...
...
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