Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2,1/1] bdwgc: add optional cplusplus support
@ 2018-10-23 21:04 Fabrice Fontaine
  2018-10-24  4:12 ` [Buildroot] [PATCH v2, 1/1] " Baruch Siach
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2018-10-23 21:04 UTC (permalink / raw)
  To: buildroot

Use CFLAGS_EXTRA to pass C and C++ flags in a single variable

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Arnout Vandecappelle and Baruch
Siach):
 - Use CFLAGS_EXTRA to pass C and C++ flags in a single variable instead
   of using CFLAGS and CPPFLAGS

 package/bdwgc/bdwgc.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
index 5603df8d9d..1d8d7284f8 100644
--- a/package/bdwgc/bdwgc.mk
+++ b/package/bdwgc/bdwgc.mk
@@ -27,9 +27,17 @@ ifeq ($(BR2_STATIC_LIBS),y)
 BDWGC_CFLAGS += -DGC_NO_DLOPEN
 endif
 
+BDWGC_CONF_OPTS = CFLAGS_EXTRA="$(BDWGC_CFLAGS)"
+
 # Ensure we use the system libatomic_ops, and not the internal one.
-BDWGC_CONF_OPTS = --with-libatomic-ops=yes CFLAGS="$(BDWGC_CFLAGS)"
+BDWGC_CONF_OPTS += --with-libatomic-ops=yes
 HOST_BDWGC_CONF_OPTS = --with-libatomic-ops=yes
 
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+BDWGC_CONF_OPTS += --enable-cplusplus
+else
+BDWGC_CONF_OPTS += --disable-cplusplus
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2, 1/1] bdwgc: add optional cplusplus support
  2018-10-23 21:04 [Buildroot] [PATCH v2,1/1] bdwgc: add optional cplusplus support Fabrice Fontaine
@ 2018-10-24  4:12 ` Baruch Siach
  2018-10-24 18:03   ` Fabrice Fontaine
  0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2018-10-24  4:12 UTC (permalink / raw)
  To: buildroot

Hi Fabrice,

On Tue, Oct 23, 2018 at 11:04:05PM +0200, Fabrice Fontaine wrote:
> Use CFLAGS_EXTRA to pass C and C++ flags in a single variable
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Arnout Vandecappelle and Baruch
> Siach):
>  - Use CFLAGS_EXTRA to pass C and C++ flags in a single variable instead
>    of using CFLAGS and CPPFLAGS
> 
>  package/bdwgc/bdwgc.mk | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
> index 5603df8d9d..1d8d7284f8 100644
> --- a/package/bdwgc/bdwgc.mk
> +++ b/package/bdwgc/bdwgc.mk
> @@ -27,9 +27,17 @@ ifeq ($(BR2_STATIC_LIBS),y)
>  BDWGC_CFLAGS += -DGC_NO_DLOPEN
>  endif
>  
> +BDWGC_CONF_OPTS = CFLAGS_EXTRA="$(BDWGC_CFLAGS)"

I think you can just drop BDWGC_CFLAGS. Instead use CFLAGS_EXTRA alone in 
BDWGC_CONF_OPTS.

baruch

> +
>  # Ensure we use the system libatomic_ops, and not the internal one.
> -BDWGC_CONF_OPTS = --with-libatomic-ops=yes CFLAGS="$(BDWGC_CFLAGS)"
> +BDWGC_CONF_OPTS += --with-libatomic-ops=yes
>  HOST_BDWGC_CONF_OPTS = --with-libatomic-ops=yes
>  
> +ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
> +BDWGC_CONF_OPTS += --enable-cplusplus
> +else
> +BDWGC_CONF_OPTS += --disable-cplusplus
> +endif
> +
>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2, 1/1] bdwgc: add optional cplusplus support
  2018-10-24  4:12 ` [Buildroot] [PATCH v2, 1/1] " Baruch Siach
@ 2018-10-24 18:03   ` Fabrice Fontaine
  2018-10-24 18:58     ` Baruch Siach
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2018-10-24 18:03 UTC (permalink / raw)
  To: buildroot

Dear Baruch
Le mer. 24 oct. 2018 ? 06:12, Baruch Siach <baruch@tkos.co.il> a ?crit :
>
> Hi Fabrice,
>
> On Tue, Oct 23, 2018 at 11:04:05PM +0200, Fabrice Fontaine wrote:
> > Use CFLAGS_EXTRA to pass C and C++ flags in a single variable
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> > Changes v1 -> v2 (after review of Arnout Vandecappelle and Baruch
> > Siach):
> >  - Use CFLAGS_EXTRA to pass C and C++ flags in a single variable instead
> >    of using CFLAGS and CPPFLAGS
> >
> >  package/bdwgc/bdwgc.mk | 10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
> > index 5603df8d9d..1d8d7284f8 100644
> > --- a/package/bdwgc/bdwgc.mk
> > +++ b/package/bdwgc/bdwgc.mk
> > @@ -27,9 +27,17 @@ ifeq ($(BR2_STATIC_LIBS),y)
> >  BDWGC_CFLAGS += -DGC_NO_DLOPEN
> >  endif
> >
> > +BDWGC_CONF_OPTS = CFLAGS_EXTRA="$(BDWGC_CFLAGS)"
>
> I think you can just drop BDWGC_CFLAGS. Instead use CFLAGS_EXTRA alone in
> BDWGC_CONF_OPTS.
I'm already just using CFLAGS_EXTRA in BDGWC_CONF_OPTS.
Do you suggest that I rename BDWGC_CFLAGS into BDWGC_CFLAGS_EXTRA to
avoid any confusion?
>
> baruch
>
> > +
> >  # Ensure we use the system libatomic_ops, and not the internal one.
> > -BDWGC_CONF_OPTS = --with-libatomic-ops=yes CFLAGS="$(BDWGC_CFLAGS)"
> > +BDWGC_CONF_OPTS += --with-libatomic-ops=yes
> >  HOST_BDWGC_CONF_OPTS = --with-libatomic-ops=yes
> >
> > +ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
> > +BDWGC_CONF_OPTS += --enable-cplusplus
> > +else
> > +BDWGC_CONF_OPTS += --disable-cplusplus
> > +endif
> > +
> >  $(eval $(autotools-package))
> >  $(eval $(host-autotools-package))
>
> --
>      http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
Best Regards,

Fabrice

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2, 1/1] bdwgc: add optional cplusplus support
  2018-10-24 18:03   ` Fabrice Fontaine
@ 2018-10-24 18:58     ` Baruch Siach
  0 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2018-10-24 18:58 UTC (permalink / raw)
  To: buildroot

Hi Fabrice,

Fabrice Fontaine writes:
> Le mer. 24 oct. 2018 ? 06:12, Baruch Siach <baruch@tkos.co.il> a ?crit :
>> On Tue, Oct 23, 2018 at 11:04:05PM +0200, Fabrice Fontaine wrote:
>> > Use CFLAGS_EXTRA to pass C and C++ flags in a single variable
>> >
>> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> > ---
>> > Changes v1 -> v2 (after review of Arnout Vandecappelle and Baruch
>> > Siach):
>> >  - Use CFLAGS_EXTRA to pass C and C++ flags in a single variable instead
>> >    of using CFLAGS and CPPFLAGS
>> >
>> >  package/bdwgc/bdwgc.mk | 10 +++++++++-
>> >  1 file changed, 9 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
>> > index 5603df8d9d..1d8d7284f8 100644
>> > --- a/package/bdwgc/bdwgc.mk
>> > +++ b/package/bdwgc/bdwgc.mk
>> > @@ -27,9 +27,17 @@ ifeq ($(BR2_STATIC_LIBS),y)
>> >  BDWGC_CFLAGS += -DGC_NO_DLOPEN
>> >  endif
>> >
>> > +BDWGC_CONF_OPTS = CFLAGS_EXTRA="$(BDWGC_CFLAGS)"
>>
>> I think you can just drop BDWGC_CFLAGS. Instead use CFLAGS_EXTRA alone in
>> BDWGC_CONF_OPTS.
> I'm already just using CFLAGS_EXTRA in BDGWC_CONF_OPTS.
> Do you suggest that I rename BDWGC_CFLAGS into BDWGC_CFLAGS_EXTRA to
> avoid any confusion?

Yes, that's what I meant.

baruch

>> > +
>> >  # Ensure we use the system libatomic_ops, and not the internal one.
>> > -BDWGC_CONF_OPTS = --with-libatomic-ops=yes CFLAGS="$(BDWGC_CFLAGS)"
>> > +BDWGC_CONF_OPTS += --with-libatomic-ops=yes
>> >  HOST_BDWGC_CONF_OPTS = --with-libatomic-ops=yes
>> >
>> > +ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
>> > +BDWGC_CONF_OPTS += --enable-cplusplus
>> > +else
>> > +BDWGC_CONF_OPTS += --disable-cplusplus
>> > +endif
>> > +
>> >  $(eval $(autotools-package))
>> >  $(eval $(host-autotools-package))

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-24 18:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-23 21:04 [Buildroot] [PATCH v2,1/1] bdwgc: add optional cplusplus support Fabrice Fontaine
2018-10-24  4:12 ` [Buildroot] [PATCH v2, 1/1] " Baruch Siach
2018-10-24 18:03   ` Fabrice Fontaine
2018-10-24 18:58     ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox