From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3,1/1] bdwgc: add optional cplusplus support
Date: Wed, 24 Oct 2018 23:01:36 +0200 [thread overview]
Message-ID: <20181024210136.8375-1-fontaine.fabrice@gmail.com> (raw)
Use CFLAGS_EXTRA to pass C and C++ flags in a single variable
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
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 | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk
index 5603df8d9d..1c80f47b92 100644
--- a/package/bdwgc/bdwgc.mk
+++ b/package/bdwgc/bdwgc.mk
@@ -19,17 +19,24 @@ HOST_BDWGC_DEPENDENCIES = host-libatomic_ops host-pkgconf
# solution.
BDWGC_AUTORECONF = YES
-BDWGC_CFLAGS = $(TARGET_CFLAGS)
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
+BDWGC_CONF_OPTS = CFLAGS_EXTRA="$(BDWGC_CFLAGS_EXTRA)"
+
# 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
next reply other threads:[~2018-10-24 21:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 21:01 Fabrice Fontaine [this message]
2018-10-25 3:57 ` [Buildroot] [PATCH v3, 1/1] bdwgc: add optional cplusplus support Baruch Siach
2018-10-25 17:27 ` Fabrice Fontaine
2018-10-25 18:46 ` Baruch Siach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181024210136.8375-1-fontaine.fabrice@gmail.com \
--to=fontaine.fabrice@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.