From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v6 1/1] package/nodejs: use system-icu for host-nodejs
Date: Mon, 27 Jul 2020 12:47:58 +0200 [thread overview]
Message-ID: <20200727104758.GS19818@scaer> (raw)
In-Reply-To: <CADvTj4rDGKr9KhQMQUgonwTmDTapEpRgf4DCpcAGbQo4P09stA@mail.gmail.com>
James, All,
On 2020-07-27 04:28 -0600, James Hilliard spake thusly:
> On Mon, Jul 27, 2020 at 3:54 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > On 2020-07-27 03:49 -0600, James Hilliard spake thusly:
> > > The nodejs configure.py file orders zlib headers before the bundled ICU
> > > headers. The zlib headers happen to be located in the system include
> > > directory, next to some system ICU headers (not bundled). If these are
> > > built before nodejs is, nodejs will get confused and try to use the
> > > system ICU headers instead of the bundled ones.
> > >
> > > Fix this by always using host-icu.
[--SNIP--]
> > > +HOST_NODEJS_CONF_OPTS = \
> > Why did you need to introduce HOST_NODEJS_CONF_OPTS? Can't we just
> > change --with-intl where it already is?
> I thought it was cleaner this way but can change it back.
No need to respin just for that.
> > > +HOST_NODEJS_CXXFLAGS = -DU_DISABLE_RENAMING=1
> > You forgot to propagate HOST_CXXFLAGS.
> Are you sure that's needed with the way the nodejs build system works?
Well, CXXFLAGS are set in $(HOST_CONFIGURE_OPTS):
$ make printvars VARS=HOST_CONFIGURE_OPTS RAW_VARS=YES
[...] CXXFLAGS="$(HOST_CXXFLAGS)" [...]
So, were they used previously? If not, then the commit log should say
so.
However, I'm afraid they were. They at least contain the CFLAGS, which
contain the optimisation level (-O2), but mnost importantly, contain the
CPPFGLAGS, so contains the correct include path to $(HOST_DIR)/include
And it seems the default value for CXXFLAGS.target does use CXXFLAGS:
tools/gyp/pylib/gyp/generator/make.py:CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
So maybe we need something like:
HOST_NODEJS_CXXFLAGS = $(HOST_CXXFLAGS) -DU_DISABLE_RENAMING=1
and in the configure and build comands:
...
$(HOST_CONFIGURE_OPTS) \
CXXFLAGS="$(HOST_NODEJS_CXXFLAGS)" \
...
Regards,
Yann E. MORIN.
> > > ifeq ($(BR2_PACKAGE_OPENSSL),y)
> > > NODEJS_DEPENDENCIES += openssl
> > > NODEJS_CONF_OPTS += --shared-openssl
> > > @@ -57,16 +71,7 @@ define HOST_NODEJS_CONFIGURE_CMDS
> > > PATH=$(@D)/bin:$(BR_PATH) \
> > > PYTHON=$(HOST_DIR)/bin/python2 \
> > > $(HOST_DIR)/bin/python2 ./configure \
> > > - --prefix=$(HOST_DIR) \
> > > - --without-snapshot \
> > > - --without-dtrace \
> > > - --without-etw \
> > > - --shared-openssl \
> > > - --shared-openssl-includes=$(HOST_DIR)/include/openssl \
> > > - --shared-openssl-libpath=$(HOST_DIR)/lib \
> > > - --shared-zlib \
> > > - --no-cross-compiling \
> > > - --with-intl=small-icu \
> > > + $(HOST_NODEJS_CONF_OPTS) \
> > > )
> > > endef
> > >
> > > @@ -81,6 +86,7 @@ define HOST_NODEJS_BUILD_CMDS
> > > $(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
> > > $(MAKE) -C $(@D) \
> > > $(HOST_CONFIGURE_OPTS) \
> > > + CXXFLAGS.target="$(HOST_NODEJS_CXXFLAGS)" \
> > > LDFLAGS.host="$(HOST_LDFLAGS)" \
> >
> > Why do we use CXXFLAGS.target but LDFLAGS.host ?
> Not sure.
> >
> > Regards,
> > Yann E. MORIN.
> >
> > > NO_LOAD=cctest.target.mk \
> > > PATH=$(@D)/bin:$(BR_PATH)
> > > @@ -90,6 +96,7 @@ define HOST_NODEJS_INSTALL_CMDS
> > > $(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
> > > $(MAKE) -C $(@D) install \
> > > $(HOST_CONFIGURE_OPTS) \
> > > + CXXFLAGS.target="$(HOST_NODEJS_CXXFLAGS)" \
> > > LDFLAGS.host="$(HOST_LDFLAGS)" \
> > > NO_LOAD=cctest.target.mk \
> > > PATH=$(@D)/bin:$(BR_PATH)
> > > --
> > > 2.25.1
> > >
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot at busybox.net
> > > http://lists.busybox.net/mailman/listinfo/buildroot
> >
> > --
> > .-----------------.--------------------.------------------.--------------------.
> > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> > | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> > '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2020-07-27 10:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 9:49 [Buildroot] [PATCH v6 1/1] package/nodejs: use system-icu for host-nodejs James Hilliard
2020-07-27 9:53 ` Yann E. MORIN
2020-07-27 10:28 ` James Hilliard
2020-07-27 10:47 ` Yann E. MORIN [this message]
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=20200727104758.GS19818@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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.