3f8e3da
--- a/third_party/libvpx/generate_gni.sh
3f8e3da
+++ b/third_party/libvpx/generate_gni.sh
3f8e3da
@@ -423,7 +423,7 @@ gen_config_files linux/mipsel "--target=
aacff36
 gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
aacff36
 gen_config_files linux/loongarch \
aacff36
   "--target=loongarch64-linux-gcc ${all_platforms}"
aacff36
-gen_config_files linux/ppc64 "--target=ppc64le-linux-gcc ${all_platforms}"
aacff36
+gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}"
aacff36
 gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
aacff36
 gen_config_files win/arm64-highbd \
3f8e3da
   "--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD} ${disable_sve}"
3f8e3da
--- a/third_party/libvpx/source/libvpx/build/make/rtcd.pl
3f8e3da
+++ b/third_party/libvpx/source/libvpx/build/make/rtcd.pl
aacff36
@@ -492,8 +492,9 @@ if ($opts{arch} eq 'x86') {
aacff36
   &require(@REQUIRES);
aacff36
   arm;
aacff36
 } elsif ($opts{arch} =~ /^ppc/ ) {
aacff36
-  @ALL_ARCHS = filter(qw/vsx/);
aacff36
-  ppc;
aacff36
+  #@ALL_ARCHS = filter(qw/vsx/);
aacff36
+  #ppc;
aacff36
+  unoptimized;
aacff36
 } elsif ($opts{arch} =~ /loongarch/ ) {
aacff36
   @ALL_ARCHS = filter(qw/lsx lasx/);
aacff36
   loongarch;
3f8e3da
--- a/third_party/libvpx/BUILD.gn
3f8e3da
+++ b/third_party/libvpx/BUILD.gn
3f8e3da
@@ -94,6 +94,14 @@ config("libvpx_config") {
aacff36
       "-Wno-sign-compare",
aacff36
     ]
aacff36
   }
aacff36
+
aacff36
+  if (current_cpu == "ppc64") {
aacff36
+    cflags += [
aacff36
+      "-mcpu=power8",
aacff36
+      "-maltivec",
aacff36
+      "-mvsx",
aacff36
+    ]
aacff36
+  }
aacff36
 }
aacff36
 
aacff36
 # This config is applied to targets that depend on libvpx.