* [Buildroot] [PATCH 1/1] cjson: build shared and static library
@ 2017-12-31 16:29 Fabrice Fontaine
2017-12-31 16:56 ` Thomas Petazzoni
2018-01-03 21:09 ` Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2017-12-31 16:29 UTC (permalink / raw)
To: buildroot
cjson 1.6.0 added the BUILD_SHARED_AND_STATIC_LIBS option which is OFF
by default so set it depending on BR2_SHARED_STATIC_LIBS value
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/cjson/cjson.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk
index f3ef7fd2ac..aabf3677ea 100644
--- a/package/cjson/cjson.mk
+++ b/package/cjson/cjson.mk
@@ -15,4 +15,10 @@ CJSON_CONF_OPTS += \
-DENABLE_CJSON_TEST=OFF \
-DENABLE_CUSTOM_COMPILER_FLAGS=OFF
+ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=ON
+else
+CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=OFF
+endif
+
$(eval $(cmake-package))
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] cjson: build shared and static library
2017-12-31 16:29 [Buildroot] [PATCH 1/1] cjson: build shared and static library Fabrice Fontaine
@ 2017-12-31 16:56 ` Thomas Petazzoni
2017-12-31 17:19 ` Fabrice Fontaine
2018-01-03 21:09 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2017-12-31 16:56 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 31 Dec 2017 17:29:33 +0100, Fabrice Fontaine wrote:
> cjson 1.6.0 added the BUILD_SHARED_AND_STATIC_LIBS option which is OFF
> by default so set it depending on BR2_SHARED_STATIC_LIBS value
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/cjson/cjson.mk | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk
> index f3ef7fd2ac..aabf3677ea 100644
> --- a/package/cjson/cjson.mk
> +++ b/package/cjson/cjson.mk
> @@ -15,4 +15,10 @@ CJSON_CONF_OPTS += \
> -DENABLE_CJSON_TEST=OFF \
> -DENABLE_CUSTOM_COMPILER_FLAGS=OFF
>
> +ifeq ($(BR2_SHARED_STATIC_LIBS),y)
> +CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=ON
> +else
> +CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=OFF
> +endif
> +
> $(eval $(cmake-package))
How is BR2_STATIC_LIBS=y handled ?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] cjson: build shared and static library
2017-12-31 16:56 ` Thomas Petazzoni
@ 2017-12-31 17:19 ` Fabrice Fontaine
2018-01-01 11:04 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2017-12-31 17:19 UTC (permalink / raw)
To: buildroot
Dear Thomas,
2017-12-31 17:56 GMT+01:00 Thomas Petazzoni <
thomas.petazzoni@free-electrons.com>:
> Hello,
>
> On Sun, 31 Dec 2017 17:29:33 +0100, Fabrice Fontaine wrote:
> > cjson 1.6.0 added the BUILD_SHARED_AND_STATIC_LIBS option which is OFF
> > by default so set it depending on BR2_SHARED_STATIC_LIBS value
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> > package/cjson/cjson.mk | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk
> > index f3ef7fd2ac..aabf3677ea 100644
> > --- a/package/cjson/cjson.mk
> > +++ b/package/cjson/cjson.mk
> > @@ -15,4 +15,10 @@ CJSON_CONF_OPTS += \
> > -DENABLE_CJSON_TEST=OFF \
> > -DENABLE_CUSTOM_COMPILER_FLAGS=OFF
> >
> > +ifeq ($(BR2_SHARED_STATIC_LIBS),y)
> > +CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=ON
> > +else
> > +CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=OFF
> > +endif
> > +
> > $(eval $(cmake-package))
>
> How is BR2_STATIC_LIBS=y handled ?
>
> If BUILD_SHARED_AND_STATIC_LIBS is not set, cjson uses the standard
BUILD_SHARED_LIBS option which is passed to OFF by buildroot if
BR2_STATIC_LIBS is set.
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
Best Regards,
Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171231/5737d17e/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] cjson: build shared and static library
2017-12-31 17:19 ` Fabrice Fontaine
@ 2018-01-01 11:04 ` Thomas Petazzoni
2018-01-01 20:16 ` Fabrice Fontaine
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-01-01 11:04 UTC (permalink / raw)
To: buildroot
Hello,
Happy New Year!
On Sun, 31 Dec 2017 18:19:34 +0100, Fabrice Fontaine wrote:
> > How is BR2_STATIC_LIBS=y handled ?
> >
> If BUILD_SHARED_AND_STATIC_LIBS is not set, cjson uses the standard
> BUILD_SHARED_LIBS option which is passed to OFF by buildroot if
> BR2_STATIC_LIBS is set.
When you say "If BUILD_SHARED_AND_STATIC_LIBS is not set", do you mean
BUILD_SHARED_AND_STATIC_LIBS=OFF or "no value is passed for
BUILD_SHARED_AND_STATIC_LIBS" ?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] cjson: build shared and static library
2018-01-01 11:04 ` Thomas Petazzoni
@ 2018-01-01 20:16 ` Fabrice Fontaine
0 siblings, 0 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2018-01-01 20:16 UTC (permalink / raw)
To: buildroot
Hello and happy new year,,
2018-01-01 12:04 GMT+01:00 Thomas Petazzoni <
thomas.petazzoni@free-electrons.com>:
> Hello,
>
> Happy New Year!
>
> On Sun, 31 Dec 2017 18:19:34 +0100, Fabrice Fontaine wrote:
>
> > > How is BR2_STATIC_LIBS=y handled ?
> > >
> > If BUILD_SHARED_AND_STATIC_LIBS is not set, cjson uses the standard
> > BUILD_SHARED_LIBS option which is passed to OFF by buildroot if
> > BR2_STATIC_LIBS is set.
>
> When you say "If BUILD_SHARED_AND_STATIC_LIBS is not set", do you mean
> BUILD_SHARED_AND_STATIC_LIBS=OFF or "no value is passed for
> BUILD_SHARED_AND_STATIC_LIBS" ?
>
I mean BUILD_SHARED_AND_STATIC_LIBS=OFF.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
Best Regards,
Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180101/bd90e3ca/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] cjson: build shared and static library
2017-12-31 16:29 [Buildroot] [PATCH 1/1] cjson: build shared and static library Fabrice Fontaine
2017-12-31 16:56 ` Thomas Petazzoni
@ 2018-01-03 21:09 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-01-03 21:09 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 31 Dec 2017 17:29:33 +0100, Fabrice Fontaine wrote:
> cjson 1.6.0 added the BUILD_SHARED_AND_STATIC_LIBS option which is OFF
> by default so set it depending on BR2_SHARED_STATIC_LIBS value
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/cjson/cjson.mk | 6 ++++++
> 1 file changed, 6 insertions(+)
I've added a comment in the .mk file and in the commit log to explain
how BUILD_SHARED_AND_STATIC_LIBS interacts with BUILD_SHARED_LIBS. And
I've applied to master.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-03 21:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-31 16:29 [Buildroot] [PATCH 1/1] cjson: build shared and static library Fabrice Fontaine
2017-12-31 16:56 ` Thomas Petazzoni
2017-12-31 17:19 ` Fabrice Fontaine
2018-01-01 11:04 ` Thomas Petazzoni
2018-01-01 20:16 ` Fabrice Fontaine
2018-01-03 21:09 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox