From 64d883a356f6a046a7104ce243b6588a21342e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sun, 6 Nov 2011 17:30:33 +0100 Subject: [PATCH] winebuild: Add support for building on powerpc64. With much help from Austin English. --- tools/winebuild/utils.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 2edb9e3cf9e..09f9b73c254 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -358,7 +358,15 @@ struct strarray *get_as_command(void) strarray_add( args, "-arch", (force_pointer_size == 8) ? "x86_64" : "i386", NULL ); break; default: - strarray_add_one( args, (force_pointer_size == 8) ? "--64" : "--32" ); + switch(target_cpu) + { + case CPU_POWERPC: + strarray_add_one( args, (force_pointer_size == 8) ? "-a64" : "-a32" ); + break; + default: + strarray_add_one( args, (force_pointer_size == 8) ? "--64" : "--32" ); + break; + } break; } } @@ -389,7 +397,15 @@ struct strarray *get_ld_command(void) strarray_add( args, "-m", (force_pointer_size == 8) ? "elf_x86_64_fbsd" : "elf_i386_fbsd", NULL ); break; default: - strarray_add( args, "-m", (force_pointer_size == 8) ? "elf_x86_64" : "elf_i386", NULL ); + switch(target_cpu) + { + case CPU_POWERPC: + strarray_add( args, "-m", (force_pointer_size == 8) ? "elf64ppc" : "elf32ppc", NULL ); + break; + default: + strarray_add( args, "-m", (force_pointer_size == 8) ? "elf_x86_64" : "elf_i386", NULL ); + break; + } break; } }