From 70edc1f6cb0022c0b7d263d5057fcad8ed3b8c33 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 22 Apr 2012 19:27:16 -0400 Subject: [PATCH] ck_pr: Merge Joao's PPC32 support with some modifications. Add PPC32 build file. Add support in configure script. --- build/ck.build.ppc | 1 + configure | 4 ++-- include/ck_pr.h | 4 ++-- include/gcc/{powerpc => ppc}/ck_f_pr.h | 0 include/gcc/{powerpc => ppc}/ck_pr.h | 0 5 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 build/ck.build.ppc rename include/gcc/{powerpc => ppc}/ck_f_pr.h (100%) rename include/gcc/{powerpc => ppc}/ck_pr.h (100%) diff --git a/build/ck.build.ppc b/build/ck.build.ppc new file mode 100644 index 0000000..bd0c2fd --- /dev/null +++ b/build/ck.build.ppc @@ -0,0 +1 @@ +CFLAGS+=-m32 -D__ppc__ diff --git a/configure b/configure index 2557642..a3de6d2 100755 --- a/configure +++ b/configure @@ -225,9 +225,9 @@ printf "Detecting machine architecture..." PLATFORM=`uname -m 2> /dev/null` case $PLATFORM in "macppc"|"Power Macintosh"|"powerpc") - PLATFORM=ppc32 + PLATFORM=ppc ENVIRONMENT=32 - assert "$PLATFORM $ENVIRONMENT" "$PLATFORM $ENVIRONMENT" "unsupported" + LDFLAGS="-m32 $LDFLAGS" ;; "sun4u"|"sun4v"|"sparc64") PLATFORM=sparcv9 diff --git a/include/ck_pr.h b/include/ck_pr.h index c2f9e4e..6df4b05 100644 --- a/include/ck_pr.h +++ b/include/ck_pr.h @@ -41,8 +41,8 @@ #include "gcc/sparcv9/ck_pr.h" #elif defined(__ppc64__) #include "gcc/ppc64/ck_pr.h" -#elif defined(__powerpc__) -#include "gcc/powerpc/ck_pr.h" +#elif defined(__ppc__) +#include "gcc/ppc/ck_pr.h" #elif defined(__GNUC__) #include "gcc/ck_pr.h" #else diff --git a/include/gcc/powerpc/ck_f_pr.h b/include/gcc/ppc/ck_f_pr.h similarity index 100% rename from include/gcc/powerpc/ck_f_pr.h rename to include/gcc/ppc/ck_f_pr.h diff --git a/include/gcc/powerpc/ck_pr.h b/include/gcc/ppc/ck_pr.h similarity index 100% rename from include/gcc/powerpc/ck_pr.h rename to include/gcc/ppc/ck_pr.h