diff mbox

[1/3] package/nodejs: use shared c-ares if available

Message ID 1500140309-26534-1-git-send-email-martin@barkynet.com
State Superseded
Headers show

Commit Message

Martin Bark July 15, 2017, 5:38 p.m. UTC
Signed-off-by: Martin Bark <martin@barkynet.com>
---
 package/nodejs/nodejs.mk | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Petazzoni July 15, 2017, 7:44 p.m. UTC | #1
Hello,

On Sat, 15 Jul 2017 18:38:27 +0100, Martin Bark wrote:

> diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
> index 43c5ff3..a469153 100644
> --- a/package/nodejs/nodejs.mk
> +++ b/package/nodejs/nodejs.mk
> @@ -34,6 +34,11 @@ else
>  NODEJS_CONF_OPTS += --with-intl=none
>  endif
>  
> +ifeq ($(BR2_PACKAGE_C_ARES),y)
> +NODEJS_DEPENDENCIES += c-ares
> +NODEJS_CONF_OPTS += --shared-cares
> +endif

So what happens if BR2_PACKAGE_C_ARES is disabled? It is not
needed/used by nodejs, or some internal/built-in version is used?

Best regards,

Thomas
Martin Bark July 15, 2017, 11:12 p.m. UTC | #2
Thomas,

On 15 July 2017 at 20:44, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Sat, 15 Jul 2017 18:38:27 +0100, Martin Bark wrote:
>
> > diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
> > index 43c5ff3..a469153 100644
> > --- a/package/nodejs/nodejs.mk
> > +++ b/package/nodejs/nodejs.mk
> > @@ -34,6 +34,11 @@ else
> >  NODEJS_CONF_OPTS += --with-intl=none
> >  endif
> >
> > +ifeq ($(BR2_PACKAGE_C_ARES),y)
> > +NODEJS_DEPENDENCIES += c-ares
> > +NODEJS_CONF_OPTS += --shared-cares
> > +endif
>
> So what happens if BR2_PACKAGE_C_ARES is disabled? It is not
> needed/used by nodejs, or some internal/built-in version is used?
>

nodejs always uses c-ares, libuv and libhttpparser, it just uses it's own
versions by default (see https://github.com/nodejs/node/tree/master/deps).
Not setting any options will continue to use the build in versions.

Thanks

Martin


> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
Thomas Petazzoni July 16, 2017, 7:16 a.m. UTC | #3
Hello,

On Sun, 16 Jul 2017 00:12:33 +0100, Martin Bark wrote:

> nodejs always uses c-ares, libuv and libhttpparser, it just uses it's own
> versions by default (see https://github.com/nodejs/node/tree/master/deps).
> Not setting any options will continue to use the build in versions.

Then in this case, we want nodejs to unconditionally select c-ares,
libuv and libhttpparser. Indeed, like most distributions, we prefer to
use the external libraries rather than the built-in ones.

Best regards,

Thomas
Martin Bark July 17, 2017, 8:43 a.m. UTC | #4
Thomas,

On 16 July 2017 at 08:16, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Sun, 16 Jul 2017 00:12:33 +0100, Martin Bark wrote:
>
> > nodejs always uses c-ares, libuv and libhttpparser, it just uses it's own
> > versions by default (see https://github.com/nodejs/node/tree/master/deps
> ).
> > Not setting any options will continue to use the build in versions.
>
> Then in this case, we want nodejs to unconditionally select c-ares,
> libuv and libhttpparser. Indeed, like most distributions, we prefer to
> use the external libraries rather than the built-in ones.
>

Sounds good, i prefer that approach.  I'll resubmit the patches to
unconditionally select the libraries.

Thanks

Martin
diff mbox

Patch

diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 43c5ff3..a469153 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -34,6 +34,11 @@  else
 NODEJS_CONF_OPTS += --with-intl=none
 endif
 
+ifeq ($(BR2_PACKAGE_C_ARES),y)
+NODEJS_DEPENDENCIES += c-ares
+NODEJS_CONF_OPTS += --shared-cares
+endif
+
 ifneq ($(BR2_PACKAGE_NODEJS_NPM),y)
 NODEJS_CONF_OPTS += --without-npm
 endif