[FFmpeg-devel] [PATCH] Autodetect PowerPC vs. PowerPC64.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Aug 29 21:51:32 CEST 2011


This is the same code as for x86_64.
This is necessary because uname returns PPC64 if the hardware
is 64 bit, however the userland can still be fully 32 bit.
In that case FFmpeg fails to compile because some macros in the
asm code are set up incorrectly.
For details see https://bugs.gentoo.org/show_bug.cgi?id=341235

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 configure |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 0dc86cb..b07167a 100755
--- a/configure
+++ b/configure
@@ -2186,13 +2186,9 @@ case "$arch" in
         arch="parisc"
         subarch="parisc64"
     ;;
-    "Power Macintosh"|ppc|powerpc)
+    "Power Macintosh"|ppc|powerpc|ppc64|powerpc64)
         arch="ppc"
     ;;
-    ppc64|powerpc64)
-        arch="ppc"
-        subarch="ppc64"
-    ;;
     s390|s390x)
         arch="s390"
     ;;
@@ -2390,6 +2386,11 @@ EOF
             spic=$shared
         fi
     ;;
+    ppc)
+        check_cc <<EOF && subarch="ppc64"
+        int test[(int)sizeof(char*) - 7];
+EOF
+    ;;
 esac
 
 enable $subarch
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list