public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/, www-client/chromium/files/
Date: Tue,  8 Oct 2019 17:50:07 +0000 (UTC)	[thread overview]
Message-ID: <1570556987.7ab2221b7ad1814586e7c991ad1df9258440558b.floppym@gentoo> (raw)

commit:     7ab2221b7ad1814586e7c991ad1df9258440558b
Author:     Stephan Hartmann <stha09 <AT> googlemail <DOT> com>
AuthorDate: Wed Oct  2 17:09:22 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Oct  8 17:49:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ab2221b

www-client/chromium: fix component-build for beta channel

Closes: https://github.com/gentoo/gentoo/pull/13131
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Stephan Hartmann <stha09 <AT> googlemail.com>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 www-client/chromium/chromium-78.0.3904.34.ebuild   |   6 +
 .../chromium/files/chromium-78-gcc-alignas.patch   | 142 +++++++++++++++++++++
 .../files/chromium-78-protobuf-export.patch        |  13 ++
 3 files changed, 161 insertions(+)

diff --git a/www-client/chromium/chromium-78.0.3904.34.ebuild b/www-client/chromium/chromium-78.0.3904.34.ebuild
index 2e268516462..525ed7e65b6 100644
--- a/www-client/chromium/chromium-78.0.3904.34.ebuild
+++ b/www-client/chromium/chromium-78.0.3904.34.ebuild
@@ -151,11 +151,13 @@ PATCHES=(
 	"${FILESDIR}/chromium-77-clang.patch"
 	"${FILESDIR}/chromium-77-pulseaudio-13.patch"
 	"${FILESDIR}/chromium-78-include.patch"
+	"${FILESDIR}/chromium-78-protobuf-export.patch"
 	"${DISTDIR}/chromium-78-revert-noexcept.patch"
 	"${DISTDIR}/chromium-78-revert-pm-observer.patch"
 	"${FILESDIR}/chromium-78-gcc-enum-range.patch"
 	"${FILESDIR}/chromium-78-gcc-std-vector.patch"
 	"${FILESDIR}/chromium-78-gcc-noexcept.patch"
+	"${FILESDIR}/chromium-78-gcc-alignas.patch"
 )
 
 pre_build_checks() {
@@ -164,6 +166,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-78-gcc-alignas.patch b/www-client/chromium/files/chromium-78-gcc-alignas.patch
new file mode 100644
index 00000000000..4f6039c2f5a
--- /dev/null
+++ b/www-client/chromium/files/chromium-78-gcc-alignas.patch
@@ -0,0 +1,142 @@
+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;
+
+Re-use chromium alignas workaround in protobuf.
+---
+
+diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc
+index f1bd85d..9c204a1 100644
+--- a/third_party/protobuf/src/google/protobuf/port_def.inc
++++ b/third_party/protobuf/src/google/protobuf/port_def.inc
+@@ -528,6 +528,35 @@ PROTOBUF_EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport));
+ #undef IN
+ #endif  // _MSC_VER
+ 
++// Specify memory alignment for structs, classes, etc.
++// Use like:
++//   class PROTOBUF_ALIGNAS(16) MyClass { ... }
++//   PROTOBUF_ALIGNAS(16) int array[4];
++//
++// In most places you can use the C++11 keyword "alignas", which is preferred.
++//
++// But compilers have trouble mixing __attribute__((...)) syntax with
++// alignas(...) syntax.
++//
++// Doesn't work in clang or gcc:
++//   struct alignas(16) __attribute__((packed)) S { char c; };
++// Works in clang but not gcc:
++//   struct __attribute__((packed)) alignas(16) S2 { char c; };
++// Works in clang and gcc:
++//   struct alignas(16) S3 { char c; } __attribute__((packed));
++//
++// There are also some attributes that must be specified *before* a class
++// definition: visibility (used for exporting functions/classes) is one of
++// these attributes. This means that it is not possible to use alignas() with a
++// class that is marked as exported.
++#if defined(_MSC_VER)
++#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment))
++#elif defined(__GNUC__)
++#define PROTOBUF_ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment)))
++#else
++#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment)
++#endif
++
+ #if defined(__clang__)
+ #pragma clang diagnostic push
+ // TODO(gerbens) ideally we cleanup the code. But a cursory try shows many
+diff --git a/third_party/protobuf/src/google/protobuf/arena.h b/third_party/protobuf/src/google/protobuf/arena.h
+index dedc221..a8515ce 100644
+--- a/third_party/protobuf/src/google/protobuf/arena.h
++++ b/third_party/protobuf/src/google/protobuf/arena.h
+@@ -245,7 +245,7 @@ struct ArenaOptions {
+ // well as protobuf container types like RepeatedPtrField and Map. The protocol
+ // is internal to protobuf and is not guaranteed to be stable. Non-proto types
+ // should not rely on this protocol.
+-class PROTOBUF_EXPORT alignas(8) Arena final {
++class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
+  public:
+   // Arena constructor taking custom options. See ArenaOptions below for
+   // descriptions of the options available.
+diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc
+index f1bd85d..6d02b53 100644
+--- a/third_party/protobuf/src/google/protobuf/port_def.inc
++++ b/third_party/protobuf/src/google/protobuf/port_def.inc
+@@ -528,6 +528,35 @@ PROTOBUF_EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport));
+ #undef IN
+ #endif  // _MSC_VER
+ 
++// Specify memory alignment for structs, classes, etc.
++// Use like:
++//   class PROTOBUF_ALIGNAS(16) MyClass { ... }
++//   PROTOBUF_ALIGNAS(16) int array[4];
++//
++// In most places you can use the C++11 keyword "alignas", which is preferred.
++//
++// But compilers have trouble mixing __attribute__((...)) syntax with
++// alignas(...) syntax.
++//
++// Doesn't work in clang or gcc:
++//   struct alignas(16) __attribute__((packed)) S { char c; };
++// Works in clang but not gcc:
++//   struct __attribute__((packed)) alignas(16) S2 { char c; };
++// Works in clang and gcc:
++//   struct alignas(16) S3 { char c; } __attribute__((packed));
++//
++// There are also some attributes that must be specified *before* a class
++// definition: visibility (used for exporting functions/classes) is one of
++// these attributes. This means that it is not possible to use alignas() with a
++// class that is marked as exported.
++#if defined(_MSC_VER)
++#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment))
++#elif defined(__GNUC__)
++#define PROTOBUF_ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment)))
++#else
++#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment)
++#endif
++
+ #if defined(__clang__)
+ #pragma clang diagnostic push
+ // TODO(gerbens) ideally we cleanup the code. But a cursory try shows many
+diff --git a/third_party/protobuf/src/google/protobuf/port_undef.inc b/third_party/protobuf/src/google/protobuf/port_undef.inc
+index b7e67fe..ba1fffc 100644
+--- a/third_party/protobuf/src/google/protobuf/port_undef.inc
++++ b/third_party/protobuf/src/google/protobuf/port_undef.inc
+@@ -80,6 +80,7 @@
+ #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_foj3FJo5StF0OvIzl7oMxA__declspec
+ #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllexport
+ #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllimport
++#undef PROTOBUF_ALIGNAS
+ 
+ 
+ 

diff --git a/www-client/chromium/files/chromium-78-protobuf-export.patch b/www-client/chromium/files/chromium-78-protobuf-export.patch
new file mode 100644
index 00000000000..ddb9e80eefe
--- /dev/null
+++ b/www-client/chromium/files/chromium-78-protobuf-export.patch
@@ -0,0 +1,13 @@
+diff --git a/third_party/protobuf/src/google/protobuf/repeated_field.h b/third_party/protobuf/src/google/protobuf/repeated_field.h
+index b5b193c..4434854 100644
+--- a/third_party/protobuf/src/google/protobuf/repeated_field.h
++++ b/third_party/protobuf/src/google/protobuf/repeated_field.h
+@@ -804,7 +804,7 @@ class StringTypeHandler {
+ // RepeatedPtrField is like RepeatedField, but used for repeated strings or
+ // Messages.
+ template <typename Element>
+-class RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
++class PROTOBUF_EXPORT RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
+  public:
+   RepeatedPtrField();
+   explicit RepeatedPtrField(Arena* arena);


             reply	other threads:[~2019-10-08 17:50 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 17:50 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-08  2:14 [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/, www-client/chromium/files/ Matt Jolly
2024-08-01  8:40 Matt Jolly
2024-07-29 22:43 Matt Jolly
2024-04-11  9:27 Matt Jolly
2023-06-10  5:31 Sam James
2023-05-05 23:27 Mike Gilbert
2023-04-20 17:43 Mike Gilbert
2023-04-13 21:23 Mike Gilbert
2023-01-25 11:17 Stephan Hartmann
2023-01-18 17:29 Stephan Hartmann
2022-12-17 22:05 Stephan Hartmann
2022-10-09 11:48 Stephan Hartmann
2022-10-06  9:12 Stephan Hartmann
2022-09-22 18:17 Stephan Hartmann
2022-08-21 13:04 Stephan Hartmann
2022-06-28  6:53 Stephan Hartmann
2022-06-14 17:01 Stephan Hartmann
2022-06-05 13:13 Stephan Hartmann
2022-06-01 21:06 Stephan Hartmann
2022-04-13 12:42 Stephan Hartmann
2022-04-08 12:28 Stephan Hartmann
2022-04-05  8:15 Stephan Hartmann
2022-03-06  8:29 Stephan Hartmann
2022-03-06  7:59 Stephan Hartmann
2022-02-15 18:45 Stephan Hartmann
2022-01-15  8:48 Stephan Hartmann
2022-01-12 19:56 Stephan Hartmann
2021-12-07 21:20 Stephan Hartmann
2021-11-24  8:06 Stephan Hartmann
2021-10-10 11:16 Stephan Hartmann
2021-09-25  7:47 Stephan Hartmann
2021-09-18 11:15 Stephan Hartmann
2021-08-03 21:08 Stephan Hartmann
2021-06-26 15:45 Stephan Hartmann
2021-04-17 12:38 Stephan Hartmann
2021-03-05 21:34 Stephan Hartmann
2021-02-20 11:43 Stephan Hartmann
2021-02-10 12:13 Stephan Hartmann
2021-01-22  8:59 Stephan Hartmann
2021-01-21 11:28 Stephan Hartmann
2021-01-10 21:36 Stephan Hartmann
2020-12-03 19:26 Stephan Hartmann
2020-11-08 12:34 Stephan Hartmann
2020-10-08  6:21 Stephan Hartmann
2020-09-24 16:38 Stephan Hartmann
2020-07-18 13:37 Mike Gilbert
2020-06-29 20:55 Mike Gilbert
2020-06-28  2:21 Mike Gilbert
2020-06-01 17:34 Mike Gilbert
2020-05-12 19:08 Mike Gilbert
2020-05-01 15:32 Mike Gilbert
2020-05-01 15:31 Mike Gilbert
2020-04-04  3:15 Mike Gilbert
2020-03-24 13:48 Mike Gilbert
2020-02-27 16:22 Mike Gilbert
2020-02-16 17:16 Mike Gilbert
2020-01-23 20:58 Mike Gilbert
2019-11-22 20:09 Mike Gilbert
2019-10-27 14:40 Mike Gilbert
2019-10-20 16:26 Mike Gilbert
2019-10-15 20:38 Mike Gilbert
2019-10-01 20:19 Mike Gilbert
2019-09-29 21:24 Mike Gilbert
2019-09-25 16:20 Mike Gilbert
2019-09-15 22:51 Mike Gilbert
2019-08-23 14:08 Mike Gilbert
2019-08-15 15:02 Mike Gilbert
2019-08-13 15:19 Mike Gilbert
2019-07-17 14:39 Mike Gilbert
2019-07-03 17:44 Mike Gilbert
2019-06-25 14:58 Mike Gilbert
2019-06-16 23:35 Mike Gilbert
2019-06-15 17:48 Mike Gilbert
2019-05-28 20:45 Mike Gilbert
2019-05-28  4:01 Mike Gilbert
2019-04-18 21:35 Pacho Ramos
2019-03-17 20:51 Mike Gilbert
2019-02-15 20:57 Mike Gilbert
2019-02-10  6:29 Mike Gilbert
2018-12-28  2:40 Jason A. Donenfeld
2018-11-05  3:30 Mike Gilbert
2018-10-15  4:59 Mike Gilbert
2018-09-30 21:28 Mike Gilbert
2018-07-22  4:46 Mike Gilbert
2018-06-15 17:39 Mike Gilbert
2018-06-10  2:48 Mike Gilbert
2018-06-09 18:21 Mike Gilbert
2018-05-09 17:12 Mike Gilbert
2018-05-06 17:29 Mike Gilbert
2018-04-25 21:02 Mike Gilbert
2018-04-23 16:14 Mike Gilbert
2018-03-09 21:03 Mike Gilbert
2018-02-09 17:06 Mike Gilbert
2017-12-24 22:11 Mike Gilbert
2017-12-23 17:45 Mike Gilbert
2017-12-16 23:24 Mike Gilbert
2017-12-16 14:07 Mike Gilbert
2017-11-13 18:19 Mike Gilbert
2017-11-12 17:49 Mike Gilbert
2017-09-30 16:26 Paweł Hajdan
2017-09-20  9:38 Paweł Hajdan
2017-09-18 15:33 Paweł Hajdan
2017-09-07 12:44 Paweł Hajdan
2017-08-22 22:08 Paweł Hajdan
2017-08-19 11:17 Paweł Hajdan
2017-08-09 16:19 Paweł Hajdan
2017-08-09 14:04 Mike Gilbert
2017-07-19 19:04 Paweł Hajdan
2017-05-24  7:07 Paweł Hajdan
2017-05-05 18:27 Paweł Hajdan
2017-04-28 15:45 Paweł Hajdan
2017-04-08 17:22 Paweł Hajdan
2017-03-29 16:27 Paweł Hajdan
2017-03-14 22:34 Mike Gilbert
2017-03-08 15:33 Paweł Hajdan
2017-02-18 14:35 Paweł Hajdan
2016-12-23 21:24 Mike Gilbert
2016-12-11 18:01 Mike Gilbert
2016-11-08  5:47 Mike Gilbert
2016-10-24 17:18 Mike Gilbert
2016-09-29  1:50 Mike Gilbert
2016-09-26  1:13 Mike Gilbert
2016-09-15  3:44 Mike Gilbert
2016-09-09 22:40 Paweł Hajdan
2016-08-24 10:23 Paweł Hajdan
2016-08-20 11:50 Paweł Hajdan
2016-08-10 20:33 Paweł Hajdan
2016-06-29 20:19 Paweł Hajdan
2016-06-02 20:14 Paweł Hajdan
2016-04-20 20:06 Paweł Hajdan
2016-03-24 23:36 Paweł Hajdan
2016-01-07 20:39 Paweł Hajdan
2015-09-30 20:29 Paweł Hajdan
2015-09-11 16:31 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1570556987.7ab2221b7ad1814586e7c991ad1df9258440558b.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox