tools/winebuild: add FreeBSD support (2/2)
Gerald Pfeifer
gerald at pfeifer.com
Thu Aug 27 14:38:46 CDT 2009
On Sat, 22 Aug 2009, Gerald Pfeifer wrote:
> This is patch 1 of 2 to add FreeBSD support to tools/winebuild. It
> adds FreeBSD as a known platform. The second half, which is awaiting
> feedback from a tester, will then leverage this.
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