Module: wine
Branch: master
Commit: 42664338686f4d5237cefede8e9a0a5cb6011d1d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=42664338686f4d5237cefede8…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Fri May 1 22:59:52 2009 -0500
configure: On Mac OS X, always specify target architecture to the dev tools.
Fixes building on Snow Leopard. Mac OS X doesn't have a concept of one
bit-ness being "native". So, which architecture gets built is somewhat
arbitrary. On Snow Leopard, the tools have changed to default to building
64-bit, which causes us problems. So, just always be explicit.
---
configure | 23 +++++++++++++++++++++++
configure.ac | 21 +++++++++++++++++++++
2 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index fa8add2..a44b1ca 100755
--- a/configure
+++ b/configure
@@ -3811,6 +3811,29 @@ fi
case $host in
+ *-darwin*)
+ if test "x$enable_win64" == "xyes"
+ then
+ CC="$CC -m64"
+ CXX="$CXX -m64"
+ LD="${LD:-ld} -arch x86_64"
+ AS="${AS:-as} -arch x86_64"
+ host_cpu="x86_64"
+ notice_platform="64-bit "
+ TARGETFLAGS="-m64"
+
+ else
+ CC="$CC -m32"
+ CXX="$CXX -m32"
+ LD="${LD:-ld} -arch i386"
+ AS="${AS:-as} -arch i386"
+ host_cpu="i386"
+ notice_platform="32-bit "
+ TARGETFLAGS="-m32"
+
+ enable_win16=${enable_win16:-yes}
+ fi
+ ;;
x86_64*)
if test "x$enable_win64" != "xyes" -a "$cross_compiling" != "yes"
then
diff --git a/configure.ac b/configure.ac
index 0d92131..322b6e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,6 +102,27 @@ dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
AC_CHECK_TOOL(CPPBIN,cpp,cpp)
case $host in
+ *-darwin*)
+ if test "x$enable_win64" == "xyes"
+ then
+ CC="$CC -m64"
+ CXX="$CXX -m64"
+ LD="${LD:-ld} -arch x86_64"
+ AS="${AS:-as} -arch x86_64"
+ host_cpu="x86_64"
+ notice_platform="64-bit "
+ AC_SUBST(TARGETFLAGS,"-m64")
+ else
+ CC="$CC -m32"
+ CXX="$CXX -m32"
+ LD="${LD:-ld} -arch i386"
+ AS="${AS:-as} -arch i386"
+ host_cpu="i386"
+ notice_platform="32-bit "
+ AC_SUBST(TARGETFLAGS,"-m32")
+ enable_win16=${enable_win16:-yes}
+ fi
+ ;;
x86_64*)
if test "x$enable_win64" != "xyes" -a "$cross_compiling" != "yes"
then
Module: wine
Branch: master
Commit: 81d1d8e355650d4d7d69efe38423075265a9d07b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=81d1d8e355650d4d7d69efe38…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Fri May 1 22:59:25 2009 -0500
winegcc: Recognize '-arch <arch>' as a compiler and linker option.
The dev tools on Mac OS X takes this option to dictate the output architecture.
(Gcc still accepts -m32 and -m64, as well, but "ld" and "as" do not.)
---
tools/winegcc/winegcc.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 9588bbf..8a3159b 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -841,6 +841,9 @@ static int is_linker_arg(const char* arg)
case 'X':
if (strcmp("-Xlinker", arg) == 0) return 1;
break;
+ case 'a':
+ if (strcmp("-arch", arg) == 0) return 1;
+ break;
}
for (j = 0; j < sizeof(link_switches)/sizeof(link_switches[0]); j++)
@@ -988,6 +991,8 @@ int main(int argc, char **argv)
case 'a':
if (strcmp("-aux-info", argv[i]) == 0)
next_is_arg = 1;
+ if (strcmp("-arch", argv[i]) == 0)
+ next_is_arg = 1;
break;
case 'X':
if (strcmp("-Xlinker", argv[i]) == 0)