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
815e766d
Commit
815e766d
authored
Oct 24, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Make the delay load flags architecture-generic.
parent
55e2335f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
makedep.c
tools/makedep.c
+10
-11
No files found.
tools/makedep.c
View file @
815e766d
...
...
@@ -167,10 +167,10 @@ static const char *dlltool;
static
const
char
*
msgfmt
;
static
const
char
*
ln_s
;
static
const
char
*
sed_cmd
;
static
const
char
*
delay_load_flag
;
/* per-architecture global variables */
static
const
char
*
strip_progs
[
MAX_ARCHS
];
static
const
char
*
debug_flags
[
MAX_ARCHS
];
static
const
char
*
delay_load_flags
[
MAX_ARCHS
];
static
struct
strarray
target_flags
[
MAX_ARCHS
];
struct
makefile
...
...
@@ -2073,10 +2073,9 @@ static struct makefile *get_parent_makefile( struct makefile *make )
/*******************************************************************
* needs_delay_lib
*/
static
int
needs_delay_lib
(
const
struct
makefile
*
make
)
static
int
needs_delay_lib
(
const
struct
makefile
*
make
,
unsigned
int
arch
)
{
if
(
delay_load_flag
)
return
0
;
if
(
*
dll_ext
&&
archs
.
count
==
1
)
return
0
;
if
(
delay_load_flags
[
arch
])
return
0
;
if
(
!
make
->
importlib
)
return
0
;
return
strarray_exists
(
&
delay_import_libs
,
make
->
importlib
);
}
...
...
@@ -2238,7 +2237,7 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra
{
const
char
*
ext
=
NULL
;
if
(
type
==
IMPORT_TYPE_DELAYED
&&
!
delay_load_flag
&&
(
arch
||
!*
dll_ext
)
)
ext
=
".delay.a"
;
if
(
type
==
IMPORT_TYPE_DELAYED
&&
!
delay_load_flag
s
[
arch
]
)
ext
=
".delay.a"
;
else
if
(
arch
)
ext
=
".cross.a"
;
if
(
ext
)
lib
=
replace_extension
(
lib
,
".a"
,
ext
);
strarray_add_uniq
(
deps
,
lib
);
...
...
@@ -3175,7 +3174,6 @@ static void output_module( struct makefile *make, unsigned int arch )
struct
strarray
imports
=
make
->
imports
;
const
char
*
module_name
=
make
->
module
;
const
char
*
debug_file
;
const
char
*
delay_load
=
delay_load_flag
;
char
*
spec_file
=
NULL
;
unsigned
int
i
;
...
...
@@ -3198,11 +3196,10 @@ static void output_module( struct makefile *make, unsigned int arch )
strarray_addall
(
&
all_libs
,
libs
);
}
if
(
!
arch
&&
*
dll_ext
)
delay_load
=
"-Wl,-delayload,"
;
if
(
delay_load
)
if
(
delay_load_flags
[
arch
])
{
for
(
i
=
0
;
i
<
make
->
delayimports
.
count
;
i
++
)
strarray_add
(
&
all_libs
,
strmake
(
"%s%s%s"
,
delay_load
,
make
->
delayimports
.
str
[
i
],
strarray_add
(
&
all_libs
,
strmake
(
"%s%s%s"
,
delay_load
_flags
[
arch
]
,
make
->
delayimports
.
str
[
i
],
strchr
(
make
->
delayimports
.
str
[
i
],
'.'
)
?
""
:
".dll"
));
}
}
...
...
@@ -3300,7 +3297,7 @@ static void output_import_lib( struct makefile *make, unsigned int arch )
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.a"
,
make
->
importlib
));
output_filename
(
strmake
(
"%s.a"
,
importlib_path
));
}
if
(
(
arch
||
!*
dll_ext
)
&&
needs_delay_lib
(
make
))
if
(
needs_delay_lib
(
make
,
arch
))
{
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.delay.a"
,
make
->
importlib
));
output
(
" %s.delay.a"
,
importlib_path
);
...
...
@@ -4299,7 +4296,7 @@ static int parse_option( const char *opt )
int
main
(
int
argc
,
char
*
argv
[]
)
{
const
char
*
makeflags
=
getenv
(
"MAKEFLAGS"
);
const
char
*
crosstarget
,
*
debug_flag
;
const
char
*
crosstarget
,
*
debug_flag
,
*
delay_load_flag
;
unsigned
int
i
,
j
,
arch
;
if
(
makeflags
)
parse_makeflags
(
makeflags
);
...
...
@@ -4408,11 +4405,13 @@ int main( int argc, char *argv[] )
for
(
arch
=
0
;
arch
<
archs
.
count
;
arch
++
)
{
if
(
!
is_multiarch
(
arch
))
continue
;
delay_load_flags
[
arch
]
=
delay_load_flag
;
debug_flags
[
arch
]
=
debug_flag
;
}
if
(
*
dll_ext
)
{
delay_load_flags
[
0
]
=
"-Wl,-delayload,"
;
debug_flags
[
0
]
=
NULL
;
}
...
...
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