electron10: ditch ppc64le libvpx bits, fix some sed fuckups

this is necessary because i cba to resolve the library unbundle
order with gn bootstrap necessary to regenerate the libvpx files
(the gn bootstrap has to be done before unbundling), as i'm not
entirely sure how this interfaces with electron

but this is functionally the same, so it's fine

also, fix some unfortunate (probably sed-related) fuckups that
result in creation of new files not being handled properly
This commit is contained in:
q66 2020-10-05 15:42:03 +02:00
parent cc32715de0
commit 65a4ca3c86
2 changed files with 34 additions and 84 deletions

View file

@ -1,81 +0,0 @@
Uses generic target for now. To use ppc64le, change --target to ppc64le-gnu
and add --enable-vsx, and change generic to ppc for the rtcd header.
From 18e6c5c55cfae0cfb458d8210d7bc709360a0e90 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Wed, 9 Sep 2020 19:08:25 +0200
Subject: [PATCH] enable generation of ppc64 libvpx bits
this doesn't update the gni file, that's done from
the template by running the appropriate scripts
---
third_party/libvpx/BUILD.gn | 4 ++++
third_party/libvpx/generate_gni.sh | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git third_party/libvpx/BUILD.gn third_party/libvpx/BUILD.gn
index 7198e59..3300485 100644
--- a/third_party/libvpx/BUILD.gn
+++ b/third_party/libvpx/BUILD.gn
@@ -336,6 +336,8 @@ static_library("libvpx") {
} else {
sources = libvpx_srcs_arm64
}
+ } else if (current_cpu == "ppc64") {
+ sources = libvpx_srcs_ppc64
}
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -401,6 +403,8 @@ static_library("libvp9rc") {
} else {
sources = libvpx_srcs_arm64
}
+ } else if (current_cpu == "ppc64") {
+ sources = libvpx_srcs_ppc64
}
sources += [ "//third_party/libvpx/source/libvpx/vp9/ratectrl_rtc.cc" ]
sources += [ "//third_party/libvpx/source/libvpx/vp9/ratectrl_rtc.h" ]
diff --git third_party/libvpx/generate_gni.sh third_party/libvpx/generate_gni.sh
index bcf84b0..8a3f4f1 100755
--- a/third_party/libvpx/generate_gni.sh
+++ b/third_party/libvpx/generate_gni.sh
@@ -361,6 +361,7 @@ gen_config_files linux/arm-neon-highbd "--target=armv7-linux-gcc ${all_platforms
gen_config_files linux/arm64-highbd "--target=armv8-linux-gcc ${all_platforms} ${HIGHBD}"
gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}"
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
+gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files win/arm64 "--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD}"
gen_config_files win/ia32 "--target=x86-win32-vs14 ${all_platforms} ${x86_platforms}"
@@ -386,6 +387,7 @@ lint_config linux/arm-neon-highbd
lint_config linux/arm64-highbd
lint_config linux/mipsel
lint_config linux/mips64el
+lint_config linux/ppc64
lint_config linux/generic
lint_config win/arm64
lint_config win/ia32
@@ -415,6 +417,7 @@ gen_rtcd_header linux/arm-neon-highbd armv7
gen_rtcd_header linux/arm64-highbd armv8
gen_rtcd_header linux/mipsel mipsel
gen_rtcd_header linux/mips64el mips64el
+gen_rtcd_header linux/ppc64 generic
gen_rtcd_header linux/generic generic
gen_rtcd_header win/arm64 armv8
gen_rtcd_header win/ia32 x86 "${require_sse2}"
@@ -500,6 +503,12 @@ if [ -z $ONLY_CONFIGS ]; then
echo "MIPS64 source list is identical to MIPS source list. No need to generate it."
+ echo "Generate ppc64 source list."
+ config=$(print_config_basic linux/ppc64)
+ make_clean
+ make libvpx_srcs.txt target=libs $config > /dev/null
+ convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_ppc64
+
echo "Generate NaCl source list."
config=$(print_config_basic nacl)
make_clean
--
2.28.0

View file

@ -1021,7 +1021,7 @@ index 22ce78027..a69b024c2 100644
diff --git sandbox/linux/system_headers/ppc64_linux_syscalls.h sandbox/linux/system_headers/ppc64_linux_syscalls.h
new file mode 100644
index 000000000..ccacffe22
--- a//dev/null
--- /dev/null
+++ b/sandbox/linux/system_headers/ppc64_linux_syscalls.h
@@ -0,0 +1,12 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
@ -1039,7 +1039,7 @@ index 000000000..ccacffe22
diff --git sandbox/linux/system_headers/ppc64_linux_ucontext.h sandbox/linux/system_headers/ppc64_linux_ucontext.h
new file mode 100644
index 000000000..07728e087
--- a//dev/null
--- /dev/null
+++ b/sandbox/linux/system_headers/ppc64_linux_ucontext.h
@@ -0,0 +1,12 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
@ -3343,7 +3343,7 @@ index 788dc6cf..5fd7e8fd 100644
diff --git third_party/dav1d/config/linux/ppc64/config.h third_party/dav1d/config/linux/ppc64/config.h
new file mode 100644
index 00000000..f6ca57f7
--- a//dev/null
--- /dev/null
+++ b/third_party/dav1d/config/linux/ppc64/config.h
@@ -0,0 +1,35 @@
+/*
@ -3435,6 +3435,37 @@ index 0b4bd72f..a0caa5e7 100644
+#endif
+
#endif /* DAV1D_SRC_PPC_TYPES_H */
diff --git third_party/libvpx/BUILD.gn third_party/libvpx/BUILD.gn
index 31a26e5b44..84c15b61b8 100644
--- a/third_party/libvpx/BUILD.gn
+++ b/third_party/libvpx/BUILD.gn
@@ -38,6 +38,8 @@ if (current_cpu == "x86") {
if (is_nacl) {
platform_include_dir = "source/config/nacl"
+} else if (current_cpu == "ppc64") {
+ platform_include_dir = "source/config/linux/generic"
} else {
# The mac configurations are currently a relic. They were useful when
# x86inc.asm did not work for MACH_O but now the build is identical to the
@@ -336,6 +336,8 @@ static_library("libvpx") {
} else {
sources = libvpx_srcs_arm64
}
+ } else if (current_cpu == "ppc64") {
+ sources = libvpx_srcs_generic
}
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -401,6 +403,8 @@ static_library("libvp9rc") {
} else {
sources = libvpx_srcs_arm64
}
+ } else if (current_cpu == "ppc64") {
+ sources = libvpx_srcs_generic
}
sources += [ "//third_party/libvpx/source/libvpx/vp9/ratectrl_rtc.cc" ]
sources += [ "//third_party/libvpx/source/libvpx/vp9/ratectrl_rtc.h" ]
diff --git third_party/lss/linux_syscall_support.h third_party/lss/linux_syscall_support.h
index d2baee9d..9955ce44 100644
--- a/third_party/lss/linux_syscall_support.h