From: Timothy Pearson tpearson@raptorengineering.com
Signed-off-by: André Hentschel nerv@dawncrow.de --- tools/widl/widl.c | 38 +++++++++++++++++++++++--------------- tools/widl/widl.h | 2 +- 2 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/tools/widl/widl.c b/tools/widl/widl.c index a99eed4e9dd..172537584a3 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -97,6 +97,8 @@ static const char version_string[] = "Wine IDL Compiler version " PACKAGE_VERSIO enum target_cpu target_cpu = CPU_x86; #elif defined(__x86_64__) enum target_cpu target_cpu = CPU_x86_64; +#elif defined(__powerpc64__) +enum target_cpu target_cpu = CPU_POWERPC64; #elif defined(__powerpc__) enum target_cpu target_cpu = CPU_POWERPC; #elif defined(__arm__) @@ -286,21 +288,23 @@ static void set_target( const char *target ) enum target_cpu cpu; } cpu_names[] = { - { "i386", CPU_x86 }, - { "i486", CPU_x86 }, - { "i586", CPU_x86 }, - { "i686", CPU_x86 }, - { "i786", CPU_x86 }, - { "amd64", CPU_x86_64 }, - { "x86_64", CPU_x86_64 }, - { "powerpc", CPU_POWERPC }, - { "arm", CPU_ARM }, - { "armv5", CPU_ARM }, - { "armv6", CPU_ARM }, - { "armv7", CPU_ARM }, - { "armv7a", CPU_ARM }, - { "arm64", CPU_ARM64 }, - { "aarch64", CPU_ARM64 }, + { "i386", CPU_x86 }, + { "i486", CPU_x86 }, + { "i586", CPU_x86 }, + { "i686", CPU_x86 }, + { "i786", CPU_x86 }, + { "amd64", CPU_x86_64 }, + { "x86_64", CPU_x86_64 }, + { "powerpc", CPU_POWERPC }, + { "powerpc64", CPU_POWERPC64 }, + { "powerpc64le", CPU_POWERPC64 }, + { "arm", CPU_ARM }, + { "armv5", CPU_ARM }, + { "armv6", CPU_ARM }, + { "armv7", CPU_ARM }, + { "armv7a", CPU_ARM }, + { "arm64", CPU_ARM64 }, + { "aarch64", CPU_ARM64 }, };
unsigned int i; @@ -801,6 +805,10 @@ int main(int argc,char *argv[]) if (pointer_size == 4) error( "Cannot build 32-bit code for this CPU\n" ); pointer_size = 8; break; + case CPU_POWERPC64: + if (pointer_size == 4) error( "Cannot build 32-bit code for this CPU\n" ); + pointer_size = 8; + break; default: if (pointer_size == 8) error( "Cannot build 64-bit code for this CPU\n" ); pointer_size = 4; diff --git a/tools/widl/widl.h b/tools/widl/widl.h index 4f4252e3ea3..bc6226c54fe 100644 --- a/tools/widl/widl.h +++ b/tools/widl/widl.h @@ -76,7 +76,7 @@ extern int char_number;
enum target_cpu { - CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_LAST = CPU_ARM64 + CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_POWERPC64, CPU_LAST = CPU_POWERPC64 };
extern enum target_cpu target_cpu;