diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index e0cd8bcb9df..bbf23f4dd95 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -297,9 +297,20 @@ 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; + + switch (target_platform) + { + case PLATFORM_APPLE: + args = (force_pointer_size == 8) ? " -arch x86_64" : " -arch i386"; + break; + case PLATFORM_FREEBSD: + args = (force_pointer_size == 8) ? " -m elf_x86_64" : " -m elf_i386_fbsd"; + break; + default: + args = (force_pointer_size == 8) ? " -m elf_x86_64" : " -m elf_i386"; + break; + } ld_command = xrealloc( ld_command, strlen(ld_command) + strlen(args) + 1 ); strcat( ld_command, args ); }