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
4cfe7477
Commit
4cfe7477
authored
Mar 03, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Return build_tool_name result as strarray.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
945c61c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
winegcc.c
tools/winegcc/winegcc.c
+12
-12
No files found.
tools/winegcc/winegcc.c
View file @
4cfe7477
...
...
@@ -314,7 +314,7 @@ static char* get_temp_file(const char* prefix, const char* suffix)
return
tmp
;
}
static
const
char
*
build_tool_name
(
struct
options
*
opts
,
const
char
*
base
,
const
char
*
deflt
)
static
strarray
*
build_tool_name
(
struct
options
*
opts
,
const
char
*
base
,
const
char
*
deflt
)
{
const
char
*
path
;
char
*
str
;
...
...
@@ -334,31 +334,31 @@ static const char* build_tool_name(struct options *opts, const char* base, const
else
str
=
xstrdup
(
deflt
);
if
((
path
=
find_binary
(
opts
->
prefix
,
str
)))
return
path
;
if
((
path
=
find_binary
(
opts
->
prefix
,
str
)))
return
strarray_fromstring
(
path
,
" "
)
;
error
(
"Could not find %s
\n
"
,
base
);
return
NULL
;
}
static
strarray
*
get_translator
(
struct
options
*
opts
)
{
const
char
*
str
=
NULL
;
strarray
*
tool
;
switch
(
opts
->
processor
)
{
case
proc_cpp
:
str
=
build_tool_name
(
opts
,
"cpp"
,
CPP
);
tool
=
build_tool_name
(
opts
,
"cpp"
,
CPP
);
break
;
case
proc_cc
:
case
proc_as
:
str
=
build_tool_name
(
opts
,
"gcc"
,
CC
);
tool
=
build_tool_name
(
opts
,
"gcc"
,
CC
);
break
;
case
proc_cxx
:
str
=
build_tool_name
(
opts
,
"g++"
,
CXX
);
tool
=
build_tool_name
(
opts
,
"g++"
,
CXX
);
break
;
default:
assert
(
0
);
}
return
strarray_fromstring
(
str
,
" "
)
;
return
tool
;
}
static
int
try_link
(
const
strarray
*
prefix
,
const
strarray
*
link_tool
,
const
char
*
cflags
)
...
...
@@ -680,8 +680,8 @@ static void compile(struct options* opts, const char* lang)
/* mixing different C and C++ compilers isn't supported in configure anyway */
case
proc_cc
:
case
proc_cxx
:
gcc
=
strarray_fromstring
(
build_tool_name
(
opts
,
"gcc"
,
CC
),
" "
);
gpp
=
strarray_fromstring
(
build_tool_name
(
opts
,
"g++"
,
CXX
),
" "
);
gcc
=
build_tool_name
(
opts
,
"gcc"
,
CC
);
gpp
=
build_tool_name
(
opts
,
"g++"
,
CXX
);
for
(
j
=
0
;
!
gcc_defs
&&
j
<
comp_args
->
size
;
j
++
)
{
const
char
*
cc
=
comp_args
->
base
[
j
];
...
...
@@ -993,7 +993,7 @@ static void add_library( struct options *opts, strarray *lib_dirs, strarray *fil
static
void
build
(
struct
options
*
opts
)
{
strarray
*
lib_dirs
,
*
files
;
strarray
*
spec_args
,
*
link_args
;
strarray
*
spec_args
,
*
link_args
,
*
tool
;
char
*
output_file
,
*
output_path
;
const
char
*
spec_o_name
,
*
libgcc
=
NULL
;
const
char
*
output_name
,
*
spec_file
,
*
lang
;
...
...
@@ -1161,8 +1161,8 @@ static void build(struct options* opts)
/* run winebuild to generate the .spec.o file */
spec_args
=
get_winebuild_args
(
opts
);
strarray_add
(
spec_args
,
strmake
(
"--cc-cmd=%s"
,
build_tool_name
(
opts
,
"gcc"
,
CC
)));
if
(
!
is_pe
)
strarray_add
(
spec_args
,
strmake
(
"--ld-cmd=%s"
,
build_tool_name
(
opts
,
"ld"
,
LD
)));
if
((
tool
=
build_tool_name
(
opts
,
"gcc"
,
CC
)))
strarray_add
(
spec_args
,
strmake
(
"--cc-cmd=%s"
,
strarray_tostring
(
tool
,
" "
)));
if
(
!
is_pe
&&
(
tool
=
build_tool_name
(
opts
,
"ld"
,
LD
)))
strarray_add
(
spec_args
,
strmake
(
"--ld-cmd=%s"
,
strarray_tostring
(
tool
,
" "
)));
spec_o_name
=
get_temp_file
(
output_name
,
".spec.o"
);
if
(
opts
->
force_pointer_size
)
...
...
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