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
07af19f3
Commit
07af19f3
authored
Jan 23, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Add support for specifying a custom static library suffix.
parent
cce43871
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
utils.c
tools/winegcc/utils.c
+6
-4
utils.h
tools/winegcc/utils.h
+2
-1
winegcc.c
tools/winegcc/winegcc.c
+8
-1
No files found.
tools/winegcc/utils.c
View file @
07af19f3
...
...
@@ -259,7 +259,7 @@ static char* try_lib_path(const char* dir, const char* pre,
}
static
file_type
guess_lib_type
(
enum
target_platform
platform
,
const
char
*
dir
,
const
char
*
library
,
char
**
file
)
const
char
*
library
,
c
onst
char
*
suffix
,
c
har
**
file
)
{
if
(
platform
!=
PLATFORM_WINDOWS
)
{
...
...
@@ -277,19 +277,21 @@ static file_type guess_lib_type(enum target_platform platform, const char* dir,
}
/* static archives */
if
((
*
file
=
try_lib_path
(
dir
,
"lib"
,
library
,
".a"
,
file_arh
)))
if
((
*
file
=
try_lib_path
(
dir
,
"lib"
,
library
,
suffix
,
file_arh
)))
return
file_arh
;
return
file_na
;
}
file_type
get_lib_type
(
enum
target_platform
platform
,
strarray
*
path
,
const
char
*
library
,
char
**
file
)
file_type
get_lib_type
(
enum
target_platform
platform
,
strarray
*
path
,
const
char
*
library
,
const
char
*
suffix
,
char
**
file
)
{
unsigned
int
i
;
if
(
!
suffix
)
suffix
=
".a"
;
for
(
i
=
0
;
i
<
path
->
size
;
i
++
)
{
file_type
type
=
guess_lib_type
(
platform
,
path
->
base
[
i
],
library
,
file
);
file_type
type
=
guess_lib_type
(
platform
,
path
->
base
[
i
],
library
,
suffix
,
file
);
if
(
type
!=
file_na
)
return
type
;
}
return
file_na
;
...
...
tools/winegcc/utils.h
View file @
07af19f3
...
...
@@ -72,7 +72,8 @@ typedef enum {
char
*
get_basename
(
const
char
*
file
);
void
create_file
(
const
char
*
name
,
int
mode
,
const
char
*
fmt
,
...);
file_type
get_file_type
(
const
char
*
filename
);
file_type
get_lib_type
(
enum
target_platform
platform
,
strarray
*
path
,
const
char
*
library
,
char
**
file
);
file_type
get_lib_type
(
enum
target_platform
platform
,
strarray
*
path
,
const
char
*
library
,
const
char
*
suffix
,
char
**
file
);
void
spawn
(
const
strarray
*
prefix
,
const
strarray
*
arr
,
int
ignore_errors
);
extern
int
verbose
;
tools/winegcc/winegcc.c
View file @
07af19f3
...
...
@@ -199,6 +199,7 @@ struct options
const
char
*
output_name
;
const
char
*
image_base
;
const
char
*
section_align
;
const
char
*
lib_suffix
;
strarray
*
prefix
;
strarray
*
lib_dirs
;
strarray
*
linker_args
;
...
...
@@ -520,7 +521,7 @@ static void add_library( struct options *opts, strarray *lib_dirs, strarray *fil
{
char
*
static_lib
,
*
fullname
=
0
;
switch
(
get_lib_type
(
opts
->
target_platform
,
lib_dirs
,
library
,
&
fullname
))
switch
(
get_lib_type
(
opts
->
target_platform
,
lib_dirs
,
library
,
opts
->
lib_suffix
,
&
fullname
))
{
case
file_arh
:
strarray_add
(
files
,
strmake
(
"-a%s"
,
fullname
));
...
...
@@ -1333,6 +1334,12 @@ int main(int argc, char **argv)
else
opts
.
wine_objdir
=
argv
[
++
i
];
raw_compiler_arg
=
raw_linker_arg
=
0
;
}
else
if
(
!
strncmp
(
"--lib-suffix"
,
argv
[
i
],
12
)
&&
opts
.
wine_objdir
)
{
if
(
argv
[
i
][
12
]
==
'='
)
opts
.
lib_suffix
=
argv
[
i
]
+
13
;
else
opts
.
lib_suffix
=
argv
[
++
i
];
raw_compiler_arg
=
raw_linker_arg
=
0
;
}
break
;
}
...
...
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