Skip to contentSkip to conversation

bdwgc: add optional cplusplus support

PATCH Superseded Fabrice Fontaine 2 participants 4 messages Oct 23, 2018 – Oct 24, 2018

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bdwgc: add optional cplusplus support

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

---
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(-)
package/bdwgc/bdwgc.mk +9 -1
index 5603df8d9d..1d8d7284f8 100644
@@ -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))
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 bdwgc: add optional cplusplus support

Hi Fabrice,

Quoted 17 lines · Fabrice Fontaine

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

---
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(-)
package/bdwgc/bdwgc.mk +0 -0
index 5603df8d9d..1d8d7284f8 100644

package/bdwgc/bdwgc.mk ifeq ($(BR2_STATIC_LIBS),y) · line 30

Quoted 4 lines
package/bdwgc/bdwgc.mk +1 -0
@@ -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

Quoted 14 lines
package/bdwgc/bdwgc.mk +8 -1
+
 # 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))
Signature · 3 lines
     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 -
#2 lore raw

PATCH v2 1/1 bdwgc: add optional cplusplus support

Dear Baruch
Le mer. 24 oct. 2018 ? 06:12, Baruch Siach <[email protected]> a ?crit :

Quoted 24 lines

Hi Fabrice,

Quoted 20 lines · Fabrice Fontaine

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

---
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(-)
package/bdwgc/bdwgc.mk +0 -0
index 5603df8d9d..1d8d7284f8 100644
@@ -27,9 +27,17 @@ ifeq ($(BR2_STATIC_LIBS),y)
 BDWGC_CFLAGS += -DGC_NO_DLOPEN
 endif
 
Quoted 4 lines

package/bdwgc/bdwgc.mk ifeq ($(BR2_STATIC_LIBS),y) · line 30

Quoted 1 line
package/bdwgc/bdwgc.mk +1 -0
+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?

Quoted 9 lines

baruch

Quoted 6 lines
package/bdwgc/bdwgc.mk +2 -1
+
 # 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
 
Quoted 13 lines

package/bdwgc/bdwgc.mk ifeq ($(BR2_STATIC_LIBS),y) · line 43

Quoted 8 lines
package/bdwgc/bdwgc.mk +6 -0
+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

#3 lore raw

PATCH v2 1/1 bdwgc: add optional cplusplus support

Hi Fabrice,

Quoted 22 lines · Fabrice Fontaine

Le mer. 24 oct. 2018 ? 06:12, Baruch Siach <[email protected]> a ?crit :

Quoted 21 lines · Fabrice Fontaine
Quoted 20 lines

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

---
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(-)
package/bdwgc/bdwgc.mk +0 -0
index 5603df8d9d..1d8d7284f8 100644
@@ -27,9 +27,17 @@ ifeq ($(BR2_STATIC_LIBS),y)
 BDWGC_CFLAGS += -DGC_NO_DLOPEN
 endif
 
Quoted 7 lines
Quoted 4 lines

package/bdwgc/bdwgc.mk ifeq ($(BR2_STATIC_LIBS),y) · line 30

Quoted 1 line
package/bdwgc/bdwgc.mk +1 -0
+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

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
package/bdwgc/bdwgc.mk +8 -1
+
 # 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))
Signature · 3 lines
     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 -