Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
51ffea5a
Commit
51ffea5a
authored
5 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
winegcc: Use winebuild to set the builtin flag.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9dc348a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/winegcc/winegcc.c
+11
-23
11 additions, 23 deletions
tools/winegcc/winegcc.c
with
11 additions
and
23 deletions
tools/winegcc/winegcc.c
+
11
−
23
View file @
51ffea5a
...
...
@@ -524,28 +524,6 @@ static int check_platform( struct options *opts, const char *file )
return
ret
;
}
static
void
make_wine_builtin
(
const
char
*
file
)
{
static
const
char
wine_magic
[
32
]
=
"Wine builtin DLL"
;
int
fd
;
struct
{
unsigned
short
e_magic
;
unsigned
short
unused
[
29
];
unsigned
int
e_lfanew
;
}
header
;
if
((
fd
=
open
(
file
,
O_RDWR
|
O_BINARY
))
==
-
1
)
error
(
"Failed to add signature to %s
\n
"
,
file
);
if
(
read
(
fd
,
&
header
,
sizeof
(
header
)
)
==
sizeof
(
header
)
&&
!
memcmp
(
&
header
.
e_magic
,
"MZ"
,
2
))
{
if
(
header
.
e_lfanew
<
sizeof
(
header
)
+
sizeof
(
wine_magic
))
error
(
"Not enough space (%x) for Wine signature
\n
"
,
header
.
e_lfanew
);
write
(
fd
,
wine_magic
,
sizeof
(
wine_magic
)
);
}
close
(
fd
);
}
static
const
char
*
get_multiarch_dir
(
enum
target_cpu
cpu
)
{
switch
(
cpu
)
...
...
@@ -882,6 +860,16 @@ static strarray *get_winebuild_args(struct options *opts)
return
spec_args
;
}
static
void
make_wine_builtin
(
struct
options
*
opts
,
const
char
*
file
)
{
strarray
*
args
=
get_winebuild_args
(
opts
);
strarray_add
(
args
,
"--builtin"
);
strarray_add
(
args
,
file
);
spawn
(
opts
->
prefix
,
args
,
0
);
strarray_free
(
args
);
}
/* check if there is a static lib associated to a given dll */
static
char
*
find_static_lib
(
const
char
*
dll
)
{
...
...
@@ -1267,7 +1255,7 @@ static void build(struct options* opts)
spawn
(
opts
->
prefix
,
link_args
,
0
);
strarray_free
(
link_args
);
if
(
is_pe
&&
opts
->
wine_builtin
)
make_wine_builtin
(
output_path
);
if
(
is_pe
&&
opts
->
wine_builtin
)
make_wine_builtin
(
opts
,
output_path
);
/* set the base address with prelink if linker support is not present */
if
(
opts
->
prelink
&&
!
opts
->
target
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment