Ken Thomases : winebuild: On Mac OS X, use -arch option to control output of "ld" and "as".

Alexandre Julliard julliard at winehq.org
Mon May 4 09:06:37 CDT 2009


Module: wine
Branch: master
Commit: 0e0e918f0f60ebe3e0f6f11b44473853c625ba33
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0e0e918f0f60ebe3e0f6f11b44473853c625ba33

Author: Ken Thomases <ken at codeweavers.com>
Date:   Fri May  1 22:59:36 2009 -0500

winebuild: On Mac OS X, use -arch option to control output of "ld" and "as".

---

 tools/winebuild/utils.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 400f01a..d6eab0e 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -262,7 +262,9 @@ const char *get_as_command(void)
 
         if (force_pointer_size)
         {
-            const char *args = (force_pointer_size == 8) ? " --64" : " --32";
+            const char *args = (target_platform == PLATFORM_APPLE) ?
+                ((force_pointer_size == 8) ? " -arch x86_64" : " -arch i386") :
+                ((force_pointer_size == 8) ? " --64" : " --32");
             as_command = xrealloc( as_command, strlen(as_command) + strlen(args) + 1 );
             strcat( as_command, args );
         }
@@ -288,7 +290,9 @@ const char *get_ld_command(void)
 
         if (force_pointer_size)
         {
-            const char *args = (force_pointer_size == 8) ? " -m elf_x86_64" : " -m elf_i386";
+            const char *args = (target_platform == PLATFORM_APPLE) ?
+                ((force_pointer_size == 8) ? " -arch x86_64" : " -arch i386") :
+                ((force_pointer_size == 8) ? " -m elf_x86_64" : " -m elf_i386");
             ld_command = xrealloc( ld_command, strlen(ld_command) + strlen(args) + 1 );
             strcat( ld_command, args );
         }




More information about the wine-cvs mailing list