All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin Jansa" <Martin.Jansa@gmail.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: [oe] [meta-oe][PATCH v2 2/3] nodejs: Fix build with icu-69
Date: Wed, 21 Apr 2021 08:55:57 +0200	[thread overview]
Message-ID: <CA+chaQf-dXgCrU4G0PajzkCWqvfxhpZe8YDvq8kPJnq9ui7Zdg@mail.gmail.com> (raw)
In-Reply-To: <20210417181938.3824401-2-raj.khem@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5438 bytes --]

all 3
Acked-by: Martin Jansa <Martin.Jansa@gmail.com>

On Sat, Apr 17, 2021 at 8:19 PM Khem Raj <raj.khem@gmail.com> wrote:

> backport relevant v8 patch to fix the build issue
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> v2: Rebased
>
>  ...all-new-ListFormatter-createInstance.patch | 93 +++++++++++++++++++
>  .../recipes-devtools/nodejs/nodejs_14.16.1.bb |  1 +
>  2 files changed, 94 insertions(+)
>  create mode 100644
> meta-oe/recipes-devtools/nodejs/nodejs/v8-call-new-ListFormatter-createInstance.patch
>
> diff --git
> a/meta-oe/recipes-devtools/nodejs/nodejs/v8-call-new-ListFormatter-createInstance.patch
> b/meta-oe/recipes-devtools/nodejs/nodejs/v8-call-new-ListFormatter-createInstance.patch
> new file mode 100644
> index 0000000000..806360084c
> --- /dev/null
> +++
> b/meta-oe/recipes-devtools/nodejs/nodejs/v8-call-new-ListFormatter-createInstance.patch
> @@ -0,0 +1,93 @@
> +From 035c305ce7761f51328b45f1bd83e26aef267c9d Mon Sep 17 00:00:00 2001
> +From: Frank Tang <ftang@chromium.org>
> +Date: Thu, 15 Oct 2020 22:44:27 -0700
> +Subject: [PATCH] [Intl] call new ListFormatter::createInstance
> +
> +The one we currently using is now marked as internal and to be removed
> +for 68. Migrating to the style which already avaiable in ICU 67-1.
> +
> +Upstream-Status: Backport
> +Bug: v8:11031
> +Change-Id: I668382a2e1b8602ddca02bf231c5008a6c92bf2d
> +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2477751
> +Reviewed-by
> <https://chromium-review.googlesource.com/c/v8/v8/+/2477751+Reviewed-by>:
> Jakob Kummerow <jkummerow@chromium.org>
> +Commit-Queue: Frank Tang <ftang@chromium.org>
> +Cr-Commit-Position: refs/heads/master@{#70638}
> +---
> + deps/v8/src/objects/js-list-format.cc | 55
> ++++++++++++-----------------------
> + 1 file changed, 18 insertions(+), 37 deletions(-)
> +
> +--- a/deps/v8/src/objects/js-list-format.cc
> ++++ b/deps/v8/src/objects/js-list-format.cc
> +@@ -29,46 +29,27 @@ namespace v8 {
> + namespace internal {
> +
> + namespace {
> +-const char* kStandard = "standard";
> +-const char* kOr = "or";
> +-const char* kUnit = "unit";
> +-const char* kStandardShort = "standard-short";
> +-const char* kOrShort = "or-short";
> +-const char* kUnitShort = "unit-short";
> +-const char* kStandardNarrow = "standard-narrow";
> +-const char* kOrNarrow = "or-narrow";
> +-const char* kUnitNarrow = "unit-narrow";
> +
> +-const char* GetIcuStyleString(JSListFormat::Style style,
> +-                              JSListFormat::Type type) {
> ++UListFormatterWidth GetIcuWidth(JSListFormat::Style style) {
> ++  switch (style) {
> ++    case JSListFormat::Style::LONG:
> ++      return ULISTFMT_WIDTH_WIDE;
> ++    case JSListFormat::Style::SHORT:
> ++      return ULISTFMT_WIDTH_SHORT;
> ++    case JSListFormat::Style::NARROW:
> ++      return ULISTFMT_WIDTH_NARROW;
> ++  }
> ++  UNREACHABLE();
> ++}
> ++
> ++UListFormatterType GetIcuType(JSListFormat::Type type) {
> +   switch (type) {
> +     case JSListFormat::Type::CONJUNCTION:
> +-      switch (style) {
> +-        case JSListFormat::Style::LONG:
> +-          return kStandard;
> +-        case JSListFormat::Style::SHORT:
> +-          return kStandardShort;
> +-        case JSListFormat::Style::NARROW:
> +-          return kStandardNarrow;
> +-      }
> ++      return ULISTFMT_TYPE_AND;
> +     case JSListFormat::Type::DISJUNCTION:
> +-      switch (style) {
> +-        case JSListFormat::Style::LONG:
> +-          return kOr;
> +-        case JSListFormat::Style::SHORT:
> +-          return kOrShort;
> +-        case JSListFormat::Style::NARROW:
> +-          return kOrNarrow;
> +-      }
> ++      return ULISTFMT_TYPE_OR;
> +     case JSListFormat::Type::UNIT:
> +-      switch (style) {
> +-        case JSListFormat::Style::LONG:
> +-          return kUnit;
> +-        case JSListFormat::Style::SHORT:
> +-          return kUnitShort;
> +-        case JSListFormat::Style::NARROW:
> +-          return kUnitNarrow;
> +-      }
> ++      return ULISTFMT_TYPE_UNITS;
> +   }
> +   UNREACHABLE();
> + }
> +@@ -143,7 +124,7 @@ MaybeHandle<JSListFormat> JSListFormat::
> +   icu::Locale icu_locale = r.icu_locale;
> +   UErrorCode status = U_ZERO_ERROR;
> +   icu::ListFormatter* formatter = icu::ListFormatter::createInstance(
> +-      icu_locale, GetIcuStyleString(style_enum, type_enum), status);
> ++      icu_locale, GetIcuType(type_enum), GetIcuWidth(style_enum),
> status);
> +   if (U_FAILURE(status) || formatter == nullptr) {
> +     delete formatter;
> +     THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kIcuError),
> diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_14.16.1.bb
> b/meta-oe/recipes-devtools/nodejs/nodejs_14.16.1.bb
> index b24a6d6567..32bdd713b5 100644
> --- a/meta-oe/recipes-devtools/nodejs/nodejs_14.16.1.bb
> +++ b/meta-oe/recipes-devtools/nodejs/nodejs_14.16.1.bb
> @@ -21,6 +21,7 @@ SRC_URI = "
> http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
>             file://0004-v8-don-t-override-ARM-CFLAGS.patch \
>             file://big-endian.patch \
>             file://mips-warnings.patch \
> +           file://v8-call-new-ListFormatter-createInstance.patch \
>             "
>  SRC_URI_append_class-target = " \
>             file://0002-Using-native-binaries.patch \
> --
> 2.31.1
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 7093 bytes --]

  reply	other threads:[~2021-04-21  6:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 18:19 [meta-oe][PATCH v2 1/3] nodejs: Update to 14.16.1 Khem Raj
2021-04-17 18:19 ` [meta-oe][PATCH v2 2/3] nodejs: Fix build with icu-69 Khem Raj
2021-04-21  6:55   ` Martin Jansa [this message]
2021-04-17 18:19 ` [meta-oe][PATCH v2 3/3] nodejs: Do not use native host nodejs binaries Khem Raj

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=CA+chaQf-dXgCrU4G0PajzkCWqvfxhpZe8YDvq8kPJnq9ui7Zdg@mail.gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.