aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2018-10-25 21:13:16 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-11-01 22:36:39 +0100
commit3f38fbedc1c242589cd788413f42884693f18ccb (patch)
treeb7a279b93c8af7dfca7acdb1306a08a83cb8a0e9
parente75f6c4e9d3dca27c47bf19cc778c5613462eebf (diff)
downloadbuildroot-3f38fbedc1c242589cd788413f42884693f18ccb.tar.gz
buildroot-3f38fbedc1c242589cd788413f42884693f18ccb.tar.bz2
bdwgc: add optional cplusplus support
Use CFLAGS_EXTRA to pass C and C++ flags in a single variable Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/bdwgc/bdwgc.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
index 5603df8d9d..0d4c8014f4 100644
--- a/package/bdwgc/bdwgc.mk
+++ b/package/bdwgc/bdwgc.mk
@@ -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))