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
07f77c41
Commit
07f77c41
authored
Jan 15, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add -m32/-m64 options to allow 32/64-bit cross-compiles.
parent
1608cb99
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
1 deletion
+35
-1
configure
configure
+6
-1
configure.ac
configure.ac
+3
-0
build.h
tools/winebuild/build.h
+1
-0
main.c
tools/winebuild/main.c
+22
-0
winebuild.man.in
tools/winebuild/winebuild.man.in
+3
-0
No files found.
configure
View file @
07f77c41
...
...
@@ -745,10 +745,10 @@ X_PRE_LIBS
X_CFLAGS
CPP
XMKMF
TARGETFLAGS
TOOLSDIR
WIN16_INSTALL
WIN16_FILES
TARGETFLAGS
CPPBIN
ac_ct_CXX
CXXFLAGS
...
...
@@ -3867,6 +3867,11 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
AS
=
"
${
AS
:-
as
}
--32"
host_cpu
=
"i386"
notice_platform
=
"32-bit "
TARGETFLAGS
=
"-m32"
else
TARGETFLAGS
=
"-m64"
fi
;;
esac
...
...
configure.ac
View file @
07f77c41
...
...
@@ -113,6 +113,9 @@ case $host in
AS="${AS:-as} --32"
host_cpu="i386"
notice_platform="32-bit "
AC_SUBST(TARGETFLAGS,"-m32")
else
AC_SUBST(TARGETFLAGS,"-m64")
fi
;;
esac
...
...
tools/winebuild/build.h
View file @
07f77c41
...
...
@@ -231,6 +231,7 @@ extern int kill_at;
extern
int
verbose
;
extern
int
save_temps
;
extern
int
link_ext_symbols
;
extern
int
force_pointer_size
;
extern
char
*
input_file_name
;
extern
char
*
spec_file_name
;
...
...
tools/winebuild/main.c
View file @
07f77c41
...
...
@@ -48,6 +48,7 @@ int kill_at = 0;
int
verbose
=
0
;
int
save_temps
=
0
;
int
link_ext_symbols
=
0
;
int
force_pointer_size
=
0
;
#ifdef __i386__
enum
target_cpu
target_cpu
=
CPU_x86
;
...
...
@@ -240,6 +241,7 @@ static const char usage_str[] =
" --ld-cmd=LD Command to use for linking (default: ld)
\n
"
" -l, --library=LIB Import the specified library
\n
"
" -L, --library-path=DIR Look for imports libraries in DIR
\n
"
" -m32, -m64 Force building 32-bit resp. 64-bit code
\n
"
" -M, --main-module=MODULE Set the name of the main module for a Win16 dll
\n
"
" --nm-cmd=NM Command to use to get undefined symbols (default: nm)
\n
"
" --nxcompat=y|n Set the NX compatibility flag (default: yes)
\n
"
...
...
@@ -365,6 +367,12 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
lib_path
=
xrealloc
(
lib_path
,
(
nb_lib_paths
+
1
)
*
sizeof
(
*
lib_path
)
);
lib_path
[
nb_lib_paths
++
]
=
xstrdup
(
optarg
);
break
;
case
'm'
:
if
(
strcmp
(
optarg
,
"32"
)
&&
strcmp
(
optarg
,
"64"
))
fatal_error
(
"Invalid -m option '%s', expected -m32 or -m64
\n
"
,
optarg
);
if
(
!
strcmp
(
optarg
,
"32"
))
force_pointer_size
=
4
;
else
force_pointer_size
=
8
;
break
;
case
'M'
:
spec
->
type
=
SPEC_WIN16
;
break
;
...
...
@@ -490,6 +498,20 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
if
(
spec
->
file_name
&&
!
strchr
(
spec
->
file_name
,
'.'
))
strcat
(
spec
->
file_name
,
exec_mode
==
MODE_EXE
?
".exe"
:
".dll"
);
switch
(
target_cpu
)
{
case
CPU_x86
:
if
(
force_pointer_size
==
8
)
target_cpu
=
CPU_x86_64
;
break
;
case
CPU_x86_64
:
if
(
force_pointer_size
==
4
)
target_cpu
=
CPU_x86
;
break
;
default:
if
(
force_pointer_size
==
8
)
fatal_error
(
"Cannot build 64-bit code for this CPU
\n
"
);
break
;
}
return
&
argv
[
optind
];
}
...
...
tools/winebuild/winebuild.man.in
View file @
07f77c41
...
...
@@ -143,6 +143,9 @@ Import the specified library, looking for a corresponding
\fIlibname.def\fR file in the directories specified with the \fB-L\fR
option.
.TP
.B \-m32, -m64
Generate 32-bit, respectively 64-bit code.
.TP
.BI \-M,\ --main-module= module
Specify that we are building a 16-bit dll, that will ultimately be
linked together with the 32-bit dll specified in \fImodule\fR. Only
...
...
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