tools/winebuild: add FreeBSD support (2/2) (RESEND)

Gerald Pfeifer gerald at pfeifer.com
Wed Sep 30 13:21:21 CDT 2009


[ I'd like to ping this after three weeks.  This fixes a real bug
  that has reported by a user.  Any chance to get it in, or do you
  need to see this changed somehow?  ]

And this is patch 2 of 2, now verified by a user with access to
FreeBSD/AMD64.

Gerald


ChangeLog:
Add support for PLATFORM_FREEBSD to get_ld_command.

diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index d11bd32..bf414fb 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -296,9 +296,18 @@ const char *get_ld_command(void)
 
         if (force_pointer_size)
         {
-            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");
+            const char *args;
+
+            if (target_platform == PLATFORM_APPLE)
+                args = (force_pointer_size == 8) ? " -arch x86_64"
+                                                 : " -arch i386";
+            else if (target_platform == PLATFORM_FREEBSD)
+                args = (force_pointer_size == 8) ? " -m elf_x86_64"
+                                                 : " -m elf_i386_fbsd";
+            else
+                args = (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-patches mailing list