bdwgc: add optional cplusplus support
PATCH v4 1/1 bdwgc: add optional cplusplus support
Use CFLAGS_EXTRA to pass C and C++ flags in a single variable
---
Changes v3 -> v4 (after review of Baruch Siach):
- Move CFLAGS_EXTRA assignment before ifeq statements
Changes v2 -> v3 (after review of Baruch Siach):
- Replace BDWGC_CFLAGS by BDWGC_CFLAGS_EXTRA
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 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
package/bdwgc/bdwgc.mk +10 -4
@@ -19,17 +19,23 @@ HOST_BDWGC_DEPENDENCIES = host-libatomic_ops host-pkgconf # solution. BDWGC_AUTORECONF = YES -BDWGC_CFLAGS = $(TARGET_CFLAGS) +BDWGC_CONF_OPTS = CFLAGS_EXTRA="$(BDWGC_CFLAGS_EXTRA)" ifeq ($(BR2_sparc),y) -BDWGC_CFLAGS += -DAO_NO_SPARC_V9 +BDWGC_CFLAGS_EXTRA += -DAO_NO_SPARC_V9 endif ifeq ($(BR2_STATIC_LIBS),y) -BDWGC_CFLAGS += -DGC_NO_DLOPEN +BDWGC_CFLAGS_EXTRA += -DGC_NO_DLOPEN endif # 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
PATCH v4 1/1 bdwgc: add optional cplusplus support
Hello,
Quoted 6 lines · Fabrice Fontaine
Use
CFLAGS_EXTRAto pass C and C++ flags in a single variableSigned-off-by Fabrice Fontaine <[email protected]>---
Changes v3 -> v4 (after review of Baruch Siach):
- MoveCFLAGS_EXTRAassignment before ifeq statements
Actually, I would have preferred to use CFLAGS/CXXFLAGS, to only use standardized autoconf/automake variables, instead of CFLAGS_EXTRA. But apparently, the other reviewers disagree with me, so I've applied your patch to master. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com