Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
98e6a0da
Commit
98e6a0da
authored
Jun 10, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add an option to use the C compiler to assemble files.
parent
f7272176
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
build.h
tools/winebuild/build.h
+1
-0
main.c
tools/winebuild/main.c
+7
-0
utils.c
tools/winebuild/utils.c
+6
-10
winebuild.man.in
tools/winebuild/winebuild.man.in
+4
-0
No files found.
tools/winebuild/build.h
View file @
98e6a0da
...
@@ -358,6 +358,7 @@ extern const char *output_file_name;
...
@@ -358,6 +358,7 @@ extern const char *output_file_name;
extern
char
**
lib_path
;
extern
char
**
lib_path
;
extern
struct
strarray
*
as_command
;
extern
struct
strarray
*
as_command
;
extern
struct
strarray
*
cc_command
;
extern
struct
strarray
*
ld_command
;
extern
struct
strarray
*
ld_command
;
extern
struct
strarray
*
nm_command
;
extern
struct
strarray
*
nm_command
;
extern
char
*
cpu_option
;
extern
char
*
cpu_option
;
...
...
tools/winebuild/main.c
View file @
98e6a0da
...
@@ -85,6 +85,7 @@ static const char *output_file_source_name;
...
@@ -85,6 +85,7 @@ static const char *output_file_source_name;
static
int
fake_module
;
static
int
fake_module
;
struct
strarray
*
as_command
=
NULL
;
struct
strarray
*
as_command
=
NULL
;
struct
strarray
*
cc_command
=
NULL
;
struct
strarray
*
ld_command
=
NULL
;
struct
strarray
*
ld_command
=
NULL
;
struct
strarray
*
nm_command
=
NULL
;
struct
strarray
*
nm_command
=
NULL
;
char
*
cpu_option
=
NULL
;
char
*
cpu_option
=
NULL
;
...
@@ -241,6 +242,7 @@ static const char usage_str[] =
...
@@ -241,6 +242,7 @@ static const char usage_str[] =
"Options:
\n
"
"Options:
\n
"
" --as-cmd=AS Command to use for assembling (default: as)
\n
"
" --as-cmd=AS Command to use for assembling (default: as)
\n
"
" -b, --target=TARGET Specify target CPU and platform for cross-compiling
\n
"
" -b, --target=TARGET Specify target CPU and platform for cross-compiling
\n
"
" --cc-cmd=CC C compiler to use for assembling (default: fall back to --as-cmd)
\n
"
" -d, --delay-lib=LIB Import the specified library in delayed mode
\n
"
" -d, --delay-lib=LIB Import the specified library in delayed mode
\n
"
" -D SYM Ignored for C flags compatibility
\n
"
" -D SYM Ignored for C flags compatibility
\n
"
" -e, --entry=FUNC Set the DLL entry point function (default: DllMain)
\n
"
" -e, --entry=FUNC Set the DLL entry point function (default: DllMain)
\n
"
...
@@ -286,6 +288,7 @@ enum long_options_values
...
@@ -286,6 +288,7 @@ enum long_options_values
LONG_OPT_EXE
,
LONG_OPT_EXE
,
LONG_OPT_IMPLIB
,
LONG_OPT_IMPLIB
,
LONG_OPT_ASCMD
,
LONG_OPT_ASCMD
,
LONG_OPT_CCCMD
,
LONG_OPT_EXTERNAL_SYMS
,
LONG_OPT_EXTERNAL_SYMS
,
LONG_OPT_FAKE_MODULE
,
LONG_OPT_FAKE_MODULE
,
LONG_OPT_LARGE_ADDRESS_AWARE
,
LONG_OPT_LARGE_ADDRESS_AWARE
,
...
@@ -307,6 +310,7 @@ static const struct option long_options[] =
...
@@ -307,6 +310,7 @@ static const struct option long_options[] =
{
"exe"
,
0
,
0
,
LONG_OPT_EXE
},
{
"exe"
,
0
,
0
,
LONG_OPT_EXE
},
{
"implib"
,
0
,
0
,
LONG_OPT_IMPLIB
},
{
"implib"
,
0
,
0
,
LONG_OPT_IMPLIB
},
{
"as-cmd"
,
1
,
0
,
LONG_OPT_ASCMD
},
{
"as-cmd"
,
1
,
0
,
LONG_OPT_ASCMD
},
{
"cc-cmd"
,
1
,
0
,
LONG_OPT_CCCMD
},
{
"external-symbols"
,
0
,
0
,
LONG_OPT_EXTERNAL_SYMS
},
{
"external-symbols"
,
0
,
0
,
LONG_OPT_EXTERNAL_SYMS
},
{
"fake-module"
,
0
,
0
,
LONG_OPT_FAKE_MODULE
},
{
"fake-module"
,
0
,
0
,
LONG_OPT_FAKE_MODULE
},
{
"large-address-aware"
,
0
,
0
,
LONG_OPT_LARGE_ADDRESS_AWARE
},
{
"large-address-aware"
,
0
,
0
,
LONG_OPT_LARGE_ADDRESS_AWARE
},
...
@@ -476,6 +480,9 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
...
@@ -476,6 +480,9 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
case
LONG_OPT_ASCMD
:
case
LONG_OPT_ASCMD
:
as_command
=
strarray_fromstring
(
optarg
,
" "
);
as_command
=
strarray_fromstring
(
optarg
,
" "
);
break
;
break
;
case
LONG_OPT_CCCMD
:
cc_command
=
strarray_fromstring
(
optarg
,
" "
);
break
;
case
LONG_OPT_FAKE_MODULE
:
case
LONG_OPT_FAKE_MODULE
:
fake_module
=
1
;
fake_module
=
1
;
break
;
break
;
...
...
tools/winebuild/utils.c
View file @
98e6a0da
...
@@ -373,13 +373,15 @@ struct strarray *find_tool( const char *name, const char * const *names )
...
@@ -373,13 +373,15 @@ struct strarray *find_tool( const char *name, const char * const *names )
struct
strarray
*
get_as_command
(
void
)
struct
strarray
*
get_as_command
(
void
)
{
{
static
int
as_is_clang
=
0
;
struct
strarray
*
args
;
struct
strarray
*
args
;
if
(
!
as
_command
)
if
(
cc
_command
)
{
{
as_command
=
find_tool
(
"clang"
,
NULL
);
args
=
strarray_copy
(
cc_command
);
if
(
as_command
)
as_is_clang
=
1
;
strarray_add
(
args
,
"-xassembler"
,
"-c"
,
NULL
);
if
(
force_pointer_size
)
strarray_add_one
(
args
,
(
force_pointer_size
==
8
)
?
"-m64"
:
"-m32"
);
return
args
;
}
}
if
(
!
as_command
)
if
(
!
as_command
)
...
@@ -393,13 +395,7 @@ struct strarray *get_as_command(void)
...
@@ -393,13 +395,7 @@ struct strarray *get_as_command(void)
args
=
strarray_copy
(
as_command
);
args
=
strarray_copy
(
as_command
);
if
(
as_is_clang
)
{
strarray_add
(
args
,
"-xassembler"
,
"-c"
,
NULL
);
if
(
force_pointer_size
)
if
(
force_pointer_size
)
strarray_add_one
(
args
,
(
force_pointer_size
==
8
)
?
"-m64"
:
"-m32"
);
}
else
if
(
force_pointer_size
)
{
{
switch
(
target_platform
)
switch
(
target_platform
)
{
{
...
...
tools/winebuild/winebuild.man.in
View file @
98e6a0da
...
@@ -67,6 +67,10 @@ Specify the target CPU and platform on which the generated code will
...
@@ -67,6 +67,10 @@ Specify the target CPU and platform on which the generated code will
be built. The target specification is in the standard autoconf format
be built. The target specification is in the standard autoconf format
as returned by config.sub.
as returned by config.sub.
.TP
.TP
.BI \--cc-cmd= cc-command
Specify the C compiler to use to compile assembly files; the default
is to instead use the assembler specified with \fB--as-cmd\fR.
.TP
.BI \-d,\ --delay-lib= name
.BI \-d,\ --delay-lib= name
Set the delayed import mode for the specified library, which must be
Set the delayed import mode for the specified library, which must be
one of the libraries imported with the \fB-l\fR option. Delayed mode
one of the libraries imported with the \fB-l\fR option. Delayed mode
...
...
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