Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
eda25a58
Commit
eda25a58
authored
Sep 20, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Link with the full library name for Unix library imports.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0f62381f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
makedep.c
tools/makedep.c
+24
-15
No files found.
tools/makedep.c
View file @
eda25a58
...
...
@@ -2112,6 +2112,18 @@ static const char *get_static_lib( const struct makefile *make, const char *name
/*******************************************************************
* get_native_unix_lib
*/
static
const
char
*
get_native_unix_lib
(
const
struct
makefile
*
make
,
const
char
*
name
)
{
if
(
!
make
->
unixlib
)
return
NULL
;
if
(
strncmp
(
make
->
unixlib
,
name
,
strlen
(
name
)
))
return
NULL
;
if
(
make
->
unixlib
[
strlen
(
name
)]
!=
'.'
)
return
NULL
;
return
obj_dir_path
(
make
,
make
->
unixlib
);
}
/*******************************************************************
* get_parent_makefile
*/
static
struct
makefile
*
get_parent_makefile
(
struct
makefile
*
make
)
...
...
@@ -2162,13 +2174,15 @@ static int needs_implib_symlink( const struct makefile *make )
/*******************************************************************
* add_unix_libraries
*/
static
struct
strarray
add_unix_libraries
(
const
struct
makefile
*
make
,
struct
strarray
*
deps
)
static
struct
strarray
add_unix_libraries
(
const
struct
makefile
*
make
,
struct
strarray
*
deps
,
int
native_unix
)
{
struct
strarray
ret
=
empty_strarray
;
struct
strarray
all_libs
=
empty_strarray
;
unsigned
int
i
,
j
;
strarray_add
(
&
all_libs
,
"-lwine_port"
);
if
(
native_unix
&&
strcmp
(
make
->
module
,
"ntdll.dll"
))
strarray_add
(
&
all_libs
,
"-lntdll"
);
strarray_addall
(
&
all_libs
,
get_expanded_make_var_array
(
make
,
"EXTRALIBS"
));
strarray_addall
(
&
all_libs
,
libs
);
...
...
@@ -2182,6 +2196,9 @@ static struct strarray add_unix_libraries( const struct makefile *make, struct s
for
(
j
=
0
;
j
<
subdirs
.
count
;
j
++
)
if
((
lib
=
get_static_lib
(
submakes
[
j
],
name
)))
break
;
if
(
!
lib
&&
native_unix
)
for
(
j
=
0
;
j
<
subdirs
.
count
;
j
++
)
if
((
lib
=
get_native_unix_lib
(
submakes
[
j
],
name
)))
break
;
}
if
(
lib
)
...
...
@@ -3325,7 +3342,7 @@ static void output_module( struct makefile *make )
}
else
if
(
*
dll_ext
)
{
if
(
!
make
->
use_msvcrt
)
strarray_addall
(
&
all_libs
,
add_unix_libraries
(
make
,
&
dep_libs
));
if
(
!
make
->
use_msvcrt
)
strarray_addall
(
&
all_libs
,
add_unix_libraries
(
make
,
&
dep_libs
,
0
));
for
(
i
=
0
;
i
<
make
->
delayimports
.
count
;
i
++
)
strarray_add
(
&
all_libs
,
strmake
(
"-Wl,-delayload,%s%s"
,
make
->
delayimports
.
str
[
i
],
strchr
(
make
->
delayimports
.
str
[
i
],
'.'
)
?
""
:
".dll"
));
...
...
@@ -3339,7 +3356,7 @@ static void output_module( struct makefile *make )
}
else
{
strarray_addall
(
&
all_libs
,
add_unix_libraries
(
make
,
&
dep_libs
));
strarray_addall
(
&
all_libs
,
add_unix_libraries
(
make
,
&
dep_libs
,
0
));
strarray_add
(
&
make
->
all_targets
,
make
->
module
);
add_install_rule
(
make
,
make
->
module
,
make
->
module
,
strmake
(
"p$(%s)/%s"
,
spec_file
?
"dlldir"
:
"bindir"
,
make
->
module
));
...
...
@@ -3376,15 +3393,7 @@ static void output_module( struct makefile *make )
struct
strarray
extra_libs
=
get_expanded_make_var_array
(
make
,
"EXTRALIBS"
);
int
native_unix_lib
=
strarray_exists
(
&
extra_libs
,
"-Wl,--subsystem,unixlib"
);
if
(
native_unix_lib
)
{
if
(
strcmp
(
make
->
module
,
"ntdll.dll"
))
{
strarray_add
(
&
unix_libs
,
"-lntdll"
);
strarray_add
(
&
unix_deps
,
obj_dir_path
(
top_makefile
,
"dlls/ntdll/ntdll.so"
));
}
}
else
if
(
!
native_unix_lib
)
{
struct
strarray
unix_imports
=
empty_strarray
;
...
...
@@ -3399,7 +3408,7 @@ static void output_module( struct makefile *make )
strarray_addall
(
&
unix_libs
,
add_import_libs
(
make
,
&
unix_deps
,
unix_imports
,
0
,
1
));
}
strarray_addall
(
&
unix_libs
,
add_unix_libraries
(
make
,
&
unix_deps
));
strarray_addall
(
&
unix_libs
,
add_unix_libraries
(
make
,
&
unix_deps
,
native_unix_lib
));
strarray_add
(
&
make
->
all_targets
,
make
->
unixlib
);
add_install_rule
(
make
,
make
->
module
,
make
->
unixlib
,
strmake
(
"p%s/%s"
,
so_dir
,
make
->
unixlib
));
...
...
@@ -3546,7 +3555,7 @@ static void output_shared_lib( struct makefile *make )
strarray_addall
(
&
dep_libs
,
get_local_dependencies
(
make
,
basename
,
make
->
in_files
));
strarray_addall
(
&
all_libs
,
get_expanded_file_local_var
(
make
,
basename
,
"LDFLAGS"
));
strarray_addall
(
&
all_libs
,
add_unix_libraries
(
make
,
&
dep_libs
));
strarray_addall
(
&
all_libs
,
add_unix_libraries
(
make
,
&
dep_libs
,
0
));
output
(
"%s:"
,
obj_dir_path
(
make
,
make
->
sharedlib
));
output_filenames_obj_dir
(
make
,
make
->
object_files
);
...
...
@@ -3660,7 +3669,7 @@ static void output_programs( struct makefile *make )
if
(
!
objs
.
count
)
objs
=
make
->
object_files
;
if
(
!
strarray_exists
(
&
all_libs
,
"-nodefaultlibs"
))
strarray_addall
(
&
all_libs
,
add_unix_libraries
(
make
,
&
deps
));
strarray_addall
(
&
all_libs
,
add_unix_libraries
(
make
,
&
deps
,
0
));
output
(
"%s:"
,
obj_dir_path
(
make
,
program
)
);
output_filenames_obj_dir
(
make
,
objs
);
...
...
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