www-client/chromium: fix component-build for stable channel
authorStephan Hartmann <stha09@googlemail.com>
Tue, 1 Oct 2019 13:08:23 +0000 (15:08 +0200)
committerMike Gilbert <floppym@gentoo.org>
Tue, 1 Oct 2019 20:19:06 +0000 (16:19 -0400)
Closes: https://github.com/gentoo/gentoo/pull/13116
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Stephan Hartmann <stha09@googlemail.com>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
www-client/chromium/chromium-77.0.3865.90.ebuild
www-client/chromium/files/chromium-77-gcc-alignas.patch [new file with mode: 0644]

index 8e52aecdb5526d8d206b37208e87b4effa110767..0dbd8e2289d94d6d7637a0fef60f68a7a6590ef7 100644 (file)
@@ -154,6 +154,7 @@ PATCHES=(
        "${FILESDIR}/chromium-77-no-cups.patch"
        "${FILESDIR}/chromium-77-gcc-abstract.patch"
        "${FILESDIR}/chromium-77-gcc-include.patch"
+       "${FILESDIR}/chromium-77-gcc-alignas.patch"
 )
 
 pre_build_checks() {
@@ -162,6 +163,10 @@ pre_build_checks() {
                if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 8.0; then
                        die "At least gcc 8.0 is required"
                fi
+               # component build hangs with tcmalloc enabled due to sandbox issue, bug #695976.
+               if has usersandbox ${FEATURES} && use tcmalloc && use component-build; then
+                       die "Component build with tcmalloc requires FEATURES=-usersandbox."
+               fi
        fi
 
        # Check build requirements, bug #541816 and bug #471810 .
diff --git a/www-client/chromium/files/chromium-77-gcc-alignas.patch b/www-client/chromium/files/chromium-77-gcc-alignas.patch
new file mode 100644 (file)
index 0000000..3693ef5
--- /dev/null
@@ -0,0 +1,72 @@
+From 6b633c4b14850df376d5cec571699018772f358e Mon Sep 17 00:00:00 2001
+From: Tomas Popela <tomas.popela@gmail.com>
+Date: Tue, 17 Sep 2019 19:48:48 +0000
+Subject: [PATCH] GCC: Can't use alignas() together with __attribute__()
+
+It's because GCC has problems when mixing the alignas() together with
+__attribute__() (that is used to export the symbols). The best
+solution is to use ALIGNAS() macro from //base/compiler_specific.h
+together with alignof() to have the equal functionality that compiles on
+GCC as well as on clang.
+
+Bug: 819294
+Change-Id: Ieb169592a2965f17a18bfc88d28418eb723a4e5a
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1806735
+Auto-Submit: Tomáš Popela <tomas.popela@gmail.com>
+Commit-Queue: Alex Clarke <alexclarke@chromium.org>
+Reviewed-by: Alex Clarke <alexclarke@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#697330}
+---
+
+diff --git a/base/task/promise/dependent_list.h b/base/task/promise/dependent_list.h
+index 020bdbfc..3245c1c 100644
+--- a/base/task/promise/dependent_list.h
++++ b/base/task/promise/dependent_list.h
+@@ -59,7 +59,7 @@
+   // Align Node on an 8-byte boundary to ensure the first 3 bits are 0 and can
+   // be used to store additional state (see static_asserts below).
+-  class BASE_EXPORT alignas(8) Node {
++  class BASE_EXPORT ALIGNAS(8) Node {
+    public:
+     Node();
+     explicit Node(Node&& other) noexcept;
+
+From 8148fd96ae04a1150a9c6012634dcd2a7335f87a Mon Sep 17 00:00:00 2001
+From: Tomas Popela <tomas.popela@gmail.com>
+Date: Tue, 20 Aug 2019 05:23:14 +0000
+Subject: [PATCH] GCC: Can't use alignas() together with __attribute__()
+
+It's because GCC has problems when mixing the alignas() together with
+__attribute__() (that is used to export the symbols). The best
+solution is to use ALIGNAS() macro from //base/compiler_specific.h
+together with alignof() to have the equal functionality that compiles on
+GCC as well as on clang.
+
+This is a regression after https://crrev.com/659933.
+
+Bug: 994581
+Change-Id: Ia376866ff9ac57d52d2e907fa325ae5a51893d07
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758064
+Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
+Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
+Commit-Queue: Tomáš Popela <tomas.popela@gmail.com>
+Auto-Submit: Tomáš Popela <tomas.popela@gmail.com>
+Cr-Commit-Position: refs/heads/master@{#688417}
+---
+
+diff --git a/third_party/blink/renderer/core/css/css_property_value_set.h b/third_party/blink/renderer/core/css/css_property_value_set.h
+index 67b353d..1bd404e 100644
+--- a/third_party/blink/renderer/core/css/css_property_value_set.h
++++ b/third_party/blink/renderer/core/css/css_property_value_set.h
+@@ -175,8 +175,8 @@
+   DISALLOW_COPY_AND_ASSIGN(CSSLazyPropertyParser);
+ };
+-class CORE_EXPORT alignas(Member<const CSSValue>) alignas(
+-    CSSPropertyValueMetadata) ImmutableCSSPropertyValueSet
++class CORE_EXPORT ALIGNAS(alignof(Member<const CSSValue>))
++    ALIGNAS(alignof(CSSPropertyValueMetadata)) ImmutableCSSPropertyValueSet
+     : public CSSPropertyValueSet {
+  public:
+   ImmutableCSSPropertyValueSet(const CSSPropertyValue*,