www-client/chromium: disable EBP usage in ffmpeg on x86
authorMike Gilbert <floppym@gentoo.org>
Sun, 22 Jul 2018 04:44:12 +0000 (00:44 -0400)
committerMike Gilbert <floppym@gentoo.org>
Sun, 22 Jul 2018 04:44:54 +0000 (00:44 -0400)
Closes: https://bugs.gentoo.org/656902
Package-Manager: Portage-2.3.40_p15, Repoman-2.3.9_p247

www-client/chromium/chromium-67.0.3396.99.ebuild
www-client/chromium/chromium-68.0.3440.68.ebuild
www-client/chromium/chromium-69.0.3493.3.ebuild
www-client/chromium/files/chromium-ffmpeg-ebp-r0.patch [new file with mode: 0644]
www-client/chromium/files/chromium-ffmpeg-ebp-r1.patch [new file with mode: 0644]

index 48fa2fe9d54d036d3f024fd60d926be6fe55f62d..15b156c805874802971606f5903436ac9d45934a 100644 (file)
@@ -138,6 +138,7 @@ PATCHES=(
        "${FILESDIR}/chromium-stdint.patch"
        "${FILESDIR}/chromium-ffmpeg-r1.patch"
        "${FILESDIR}/chromium-ffmpeg-clang.patch"
+       "${FILESDIR}/chromium-ffmpeg-ebp-r0.patch"
 )
 
 pre_build_checks() {
index 13d9aa7c022f7d63287af1d4757bd319aa1412aa..09d01b49d5abfe15a5282de931b21e57f30d36b6 100644 (file)
@@ -140,6 +140,7 @@ PATCHES=(
        "${FILESDIR}/chromium-libjpeg-r0.patch"
        "${FILESDIR}/chromium-cors-string-r0.patch"
        "${FILESDIR}/chromium-libwebp-shim-r0.patch"
+       "${FILESDIR}/chromium-ffmpeg-ebp-r1.patch"
 )
 
 pre_build_checks() {
index 42156a1df1063f8affcb5bafc90a52818ba99268..8846a001bb72b7a369ed612980083d04a2a4b690 100644 (file)
@@ -137,6 +137,7 @@ PATCHES=(
        "${FILESDIR}/chromium-memcpy-r0.patch"
        "${FILESDIR}/chromium-math.h-r0.patch"
        "${FILESDIR}/chromium-stdint.patch"
+       "${FILESDIR}/chromium-ffmpeg-ebp-r0.patch"
 )
 
 pre_build_checks() {
diff --git a/www-client/chromium/files/chromium-ffmpeg-ebp-r0.patch b/www-client/chromium/files/chromium-ffmpeg-ebp-r0.patch
new file mode 100644 (file)
index 0000000..e7161c6
--- /dev/null
@@ -0,0 +1,18 @@
+https://bugs.chromium.org/p/chromium/issues/detail?id=796379
+https://bugs.gentoo.org/656902
+
+--- a/third_party/ffmpeg/BUILD.gn
+--- b/third_party/ffmpeg/BUILD.gn
+@@ -247,11 +247,7 @@
+     # On POSIX x86, sanitizers will fail to compiler the H264 CABAC code due to
+     # insufficient registers unless we disable EBP usage. crbug.com/786760
+     if (target_cpu == "x86") {
+-      if (using_sanitizer) {
+-        defines += [ "HAVE_EBP_AVAILABLE=0" ]
+-      } else {
+-        defines += [ "HAVE_EBP_AVAILABLE=1" ]
+-      }
++      defines += [ "HAVE_EBP_AVAILABLE=0" ]
+     }
+     if (!is_clang) {
diff --git a/www-client/chromium/files/chromium-ffmpeg-ebp-r1.patch b/www-client/chromium/files/chromium-ffmpeg-ebp-r1.patch
new file mode 100644 (file)
index 0000000..5e0f151
--- /dev/null
@@ -0,0 +1,18 @@
+https://bugs.chromium.org/p/chromium/issues/detail?id=796379
+https://bugs.gentoo.org/656902
+
+--- a/third_party/ffmpeg/BUILD.gn
+--- b/third_party/ffmpeg/BUILD.gn
+@@ -239,11 +239,7 @@
+   # Windows builds can't compile without EBP because we can't omit frame
+   # pointers like we do on posix.
+   if (target_cpu == "x86") {
+-    if (using_sanitizer || is_win) {
+-      defines += [ "HAVE_EBP_AVAILABLE=0" ]
+-    } else {
+-      defines += [ "HAVE_EBP_AVAILABLE=1" ]
+-    }
++    defines += [ "HAVE_EBP_AVAILABLE=0" ]
+   }
+   if (is_posix || is_fuchsia) {