cmake: Support PowerPC
Change-Id: I5c3abbac2fe425dad26231a66b64820832ca02eb
diff --git a/build/cmake/aom_configure.cmake b/build/cmake/aom_configure.cmake
index c62ac70..d0c1574 100644
--- a/build/cmake/aom_configure.cmake
+++ b/build/cmake/aom_configure.cmake
@@ -17,7 +17,7 @@
include(FindwxWidgets)
set(AOM_SUPPORTED_CPU_TARGETS
- "arm64 armv7 armv7s generic mips32 mips64 x86 x86_64")
+ "arm64 armv7 armv7s generic mips32 mips64 ppc x86 x86_64")
# Generate the user config settings. This must occur before include of
# aom_config_defaults.cmake (because it turns every config variable into a cache
@@ -70,6 +70,8 @@
set(AOM_TARGET_CPU "${CMAKE_SYSTEM_PROCESSOR}")
elseif ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64")
set(AOM_TARGET_CPU "arm64")
+ elseif ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^ppc")
+ set(AOM_TARGET_CPU "ppc")
else ()
message(WARNING "The architecture ${CMAKE_SYSTEM_PROCESSOR} is not "
"supported, falling back to the generic target")
diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl
index 7834999..e0dfe54 100755
--- a/build/make/rtcd.pl
+++ b/build/make/rtcd.pl
@@ -343,6 +343,27 @@
common_bottom;
}
+sub ppc() {
+ determine_indirection("c", @ALL_ARCHS);
+ common_top;
+
+ print <<EOF;
+#include "aom_config.h"
+
+#ifdef RTCD_C
+static void setup_rtcd_internal(void)
+{
+EOF
+
+ set_function_pointers("c", @ALL_ARCHS);
+
+ print <<EOF;
+}
+#endif
+EOF
+ common_bottom;
+}
+
sub unoptimized() {
determine_indirection "c";
common_top;
@@ -399,6 +420,9 @@
} elsif ($opts{arch} eq 'armv8' || $opts{arch} eq 'arm64' ) {
@ALL_ARCHS = filter(qw/neon/);
arm;
+} elsif ($opts{arch} eq 'ppc') {
+ @ALL_ARCHS = filter(qw/vsx/);
+ ppc;
} else {
unoptimized;
}