* [Buildroot] [PATCH v4,1/1] bdwgc: add optional cplusplus support
@ 2018-10-25 19:13 Fabrice Fontaine
2018-11-01 21:43 ` [Buildroot] [PATCH v4, 1/1] " Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2018-10-25 19:13 UTC (permalink / raw)
To: buildroot
Use CFLAGS_EXTRA to pass C and C++ flags in a single variable
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
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(-)
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))
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v4, 1/1] bdwgc: add optional cplusplus support
2018-10-25 19:13 [Buildroot] [PATCH v4,1/1] bdwgc: add optional cplusplus support Fabrice Fontaine
@ 2018-11-01 21:43 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-11-01 21:43 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 25 Oct 2018 21:13:16 +0200, Fabrice Fontaine wrote:
> Use CFLAGS_EXTRA to pass C and C++ flags in a single variable
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v3 -> v4 (after review of Baruch Siach):
> - Move CFLAGS_EXTRA assignment 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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-01 21:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-25 19:13 [Buildroot] [PATCH v4,1/1] bdwgc: add optional cplusplus support Fabrice Fontaine
2018-11-01 21:43 ` [Buildroot] [PATCH v4, 1/1] " Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox