Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a7074ea2
Commit
a7074ea2
authored
Nov 17, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Don't link directly to ntdll or ntoskrnl import libraries.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b65ef71f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
winegcc.c
tools/winegcc/winegcc.c
+11
-1
No files found.
tools/winegcc/winegcc.c
View file @
a7074ea2
...
...
@@ -1408,13 +1408,15 @@ static void build(struct options* opts)
strarray_add
(
&
link_args
,
name
);
break
;
case
'a'
:
if
(
is_pe
&&
!
opts
->
use_msvcrt
&&
!
opts
->
lib_suffix
&&
strchr
(
name
,
'/'
))
if
(
!
opts
->
use_msvcrt
&&
!
opts
->
lib_suffix
&&
strchr
(
name
,
'/'
))
{
/* turn the path back into -Ldir -lfoo options
* this makes sure that we use the specified libs even
* when mingw adds its own import libs to the link */
const
char
*
p
=
get_basename
(
name
);
if
(
is_pe
)
{
if
(
!
strncmp
(
p
,
"lib"
,
3
)
&&
strcmp
(
p
,
"libmsvcrt.a"
))
{
strarray_add
(
&
link_args
,
strmake
(
"-L%s"
,
get_dirname
(
name
)
));
...
...
@@ -1422,6 +1424,14 @@ static void build(struct options* opts)
break
;
}
}
else
{
/* don't link to ntdll or ntoskrnl in non-msvcrt mode
* since they export CRT functions */
if
(
!
strcmp
(
p
,
"libntdll.a"
))
break
;
if
(
!
strcmp
(
p
,
"libntoskrnl.a"
))
break
;
}
}
strarray_add
(
&
link_args
,
name
);
break
;
case
'W'
:
...
...
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