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
c14bdaf1
Commit
c14bdaf1
authored
Jan 28, 2013
by
Charles Davis
Committed by
Alexandre Julliard
Jan 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Use Clang to assemble if found.
parent
79808429
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
4 deletions
+34
-4
utils.c
tools/winebuild/utils.c
+34
-4
No files found.
tools/winebuild/utils.c
View file @
c14bdaf1
...
...
@@ -288,8 +288,6 @@ char *find_tool( const char *name, const char * const *names )
unsigned
int
i
,
len
;
struct
stat
st
;
if
(
target_alias
)
return
strmake
(
"%s-%s"
,
target_alias
,
name
);
if
(
!
dirs
)
{
char
*
path
;
...
...
@@ -322,6 +320,8 @@ char *find_tool( const char *name, const char * const *names )
while
(
*
names
)
{
len
=
strlen
(
*
names
)
+
sizeof
(
EXEEXT
)
+
1
;
if
(
target_alias
)
len
+=
strlen
(
target_alias
)
+
1
;
file
=
xmalloc
(
maxlen
+
len
);
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -330,6 +330,12 @@ char *find_tool( const char *name, const char * const *names )
p
=
file
+
strlen
(
file
);
if
(
p
==
file
)
*
p
++
=
'.'
;
if
(
p
[
-
1
]
!=
'/'
)
*
p
++
=
'/'
;
if
(
target_alias
)
{
strcpy
(
p
,
target_alias
);
p
+=
strlen
(
p
);
*
p
++
=
'-'
;
}
strcpy
(
p
,
*
names
);
strcat
(
p
,
EXEEXT
);
...
...
@@ -338,21 +344,38 @@ char *find_tool( const char *name, const char * const *names )
free
(
file
);
names
++
;
}
return
xstrdup
(
name
)
;
return
NULL
;
}
struct
strarray
*
get_as_command
(
void
)
{
static
int
as_is_clang
=
0
;
struct
strarray
*
args
=
strarray_init
();
if
(
!
as_command
)
{
as_command
=
find_tool
(
"clang"
,
NULL
);
if
(
as_command
)
as_is_clang
=
1
;
}
if
(
!
as_command
)
{
static
const
char
*
const
commands
[]
=
{
"gas"
,
"as"
,
NULL
};
as_command
=
find_tool
(
"as"
,
commands
);
}
if
(
!
as_command
)
fatal_error
(
"cannot find suitable assembler
\n
"
);
strarray_add_one
(
args
,
as_command
);
if
(
force_pointer_size
)
if
(
as_is_clang
)
{
strarray_add
(
args
,
"-xassembler"
,
"-c"
,
NULL
);
if
(
force_pointer_size
)
strarray_add_one
(
args
,
(
force_pointer_size
==
8
)
?
"-m64"
:
"-m32"
);
}
else
if
(
force_pointer_size
)
{
switch
(
target_platform
)
{
...
...
@@ -386,6 +409,10 @@ struct strarray *get_ld_command(void)
static
const
char
*
const
commands
[]
=
{
"ld"
,
"gld"
,
NULL
};
ld_command
=
find_tool
(
"ld"
,
commands
);
}
if
(
!
ld_command
)
fatal_error
(
"cannot find suitable linker
\n
"
);
strarray_add_one
(
args
,
ld_command
);
if
(
force_pointer_size
)
...
...
@@ -421,6 +448,9 @@ const char *get_nm_command(void)
static
const
char
*
const
commands
[]
=
{
"nm"
,
"gnm"
,
NULL
};
nm_command
=
find_tool
(
"nm"
,
commands
);
}
if
(
!
nm_command
)
fatal_error
(
"cannot find suitable name lister
\n
"
);
return
nm_command
;
}
...
...
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