Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] bdwgc: add optional cplusplus support
@ 2018-10-23 19:39 Fabrice Fontaine
  2018-10-23 20:02 ` Arnout Vandecappelle
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2018-10-23 19:39 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/bdwgc/bdwgc.mk | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
index 5603df8d9d..a0d7689d31 100644
--- a/package/bdwgc/bdwgc.mk
+++ b/package/bdwgc/bdwgc.mk
@@ -22,14 +22,26 @@ BDWGC_AUTORECONF = YES
 BDWGC_CFLAGS = $(TARGET_CFLAGS)
 ifeq ($(BR2_sparc),y)
 BDWGC_CFLAGS += -DAO_NO_SPARC_V9
+BDWGC_CPPFLAGS += -DAO_NO_SPARC_V9
 endif
 ifeq ($(BR2_STATIC_LIBS),y)
 BDWGC_CFLAGS += -DGC_NO_DLOPEN
+BDWGC_CPPFLAGS += -DGC_NO_DLOPEN
 endif
 
+BDWGC_CONF_OPTS = \
+	CFLAGS="$(BDWGC_CFLAGS)" \
+	CPPFLAGS="$(BDWGC_CPPFLAGS)"
+
 # 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] 3+ messages in thread

* [Buildroot] [PATCH 1/1] bdwgc: add optional cplusplus support
  2018-10-23 19:39 [Buildroot] [PATCH 1/1] bdwgc: add optional cplusplus support Fabrice Fontaine
@ 2018-10-23 20:02 ` Arnout Vandecappelle
  2018-10-23 20:20   ` Baruch Siach
  0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2018-10-23 20:02 UTC (permalink / raw)
  To: buildroot



On 10/23/18 8:39 PM, Fabrice Fontaine wrote:
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/bdwgc/bdwgc.mk | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
> index 5603df8d9d..a0d7689d31 100644
> --- a/package/bdwgc/bdwgc.mk
> +++ b/package/bdwgc/bdwgc.mk
> @@ -22,14 +22,26 @@ BDWGC_AUTORECONF = YES
>  BDWGC_CFLAGS = $(TARGET_CFLAGS)
>  ifeq ($(BR2_sparc),y)
>  BDWGC_CFLAGS += -DAO_NO_SPARC_V9
> +BDWGC_CPPFLAGS += -DAO_NO_SPARC_V9
>  endif
>  ifeq ($(BR2_STATIC_LIBS),y)
>  BDWGC_CFLAGS += -DGC_NO_DLOPEN
> +BDWGC_CPPFLAGS += -DGC_NO_DLOPEN
>  endif
>  
> +BDWGC_CONF_OPTS = \
> +	CFLAGS="$(BDWGC_CFLAGS)" \
> +	CPPFLAGS="$(BDWGC_CPPFLAGS)"

 Is it useful to specify that twice? Isn't it enough to specify only CPPFLAGS?
Maybe at the time this CFLAGS override was added (9d181bb93eb1, 3.5 years ago,
by Baruch) CPPFLAGS didn't work but now it does? Or maybe it was an
accident/convenience? The commit message doesn't say anything.

 Regards,
 Arnout

> +
>  # 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))
> 

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

* [Buildroot] [PATCH 1/1] bdwgc: add optional cplusplus support
  2018-10-23 20:02 ` Arnout Vandecappelle
@ 2018-10-23 20:20   ` Baruch Siach
  0 siblings, 0 replies; 3+ messages in thread
From: Baruch Siach @ 2018-10-23 20:20 UTC (permalink / raw)
  To: buildroot

Hi Arnout, Fabrice,

Arnout Vandecappelle writes:
> On 10/23/18 8:39 PM, Fabrice Fontaine wrote:
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> ---
>>  package/bdwgc/bdwgc.mk | 14 +++++++++++++-
>>  1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
>> index 5603df8d9d..a0d7689d31 100644
>> --- a/package/bdwgc/bdwgc.mk
>> +++ b/package/bdwgc/bdwgc.mk
>> @@ -22,14 +22,26 @@ BDWGC_AUTORECONF = YES
>>  BDWGC_CFLAGS = $(TARGET_CFLAGS)
>>  ifeq ($(BR2_sparc),y)
>>  BDWGC_CFLAGS += -DAO_NO_SPARC_V9
>> +BDWGC_CPPFLAGS += -DAO_NO_SPARC_V9
>>  endif
>>  ifeq ($(BR2_STATIC_LIBS),y)
>>  BDWGC_CFLAGS += -DGC_NO_DLOPEN
>> +BDWGC_CPPFLAGS += -DGC_NO_DLOPEN
>>  endif
>>
>> +BDWGC_CONF_OPTS = \
>> +	CFLAGS="$(BDWGC_CFLAGS)" \
>> +	CPPFLAGS="$(BDWGC_CPPFLAGS)"
>
>  Is it useful to specify that twice? Isn't it enough to specify only CPPFLAGS?
> Maybe at the time this CFLAGS override was added (9d181bb93eb1, 3.5 years ago,
> by Baruch) CPPFLAGS didn't work but now it does? Or maybe it was an
> accident/convenience? The commit message doesn't say anything.

It seems like CFLAGS_EXTRA can be used to add flags to both CFLAGS and
CPPFLAGS. See configure.ac.

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] 3+ messages in thread

end of thread, other threads:[~2018-10-23 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-23 19:39 [Buildroot] [PATCH 1/1] bdwgc: add optional cplusplus support Fabrice Fontaine
2018-10-23 20:02 ` Arnout Vandecappelle
2018-10-23 20:20   ` Baruch Siach

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