Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] flatcc: add dependency on C++11
@ 2018-09-06 19:20 Joel Carlson
  2018-09-06 19:34 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Carlson @ 2018-09-06 19:20 UTC (permalink / raw)
  To: buildroot

Some of the components built by flatcc require C++. Also, while older
toolchains may work, C11/C++11 is the reference that is expected to
always work.

Fixes
http://autobuild.buildroot.net/results/8fb0447eed1d55b7687f657530e31695cf77ce5c/

Signed-off-by: Joel Carlson <JoelsonCarl@gmail.com>
---
 package/flatcc/Config.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/flatcc/Config.in b/package/flatcc/Config.in
index 6273f2b..557bd9b 100644
--- a/package/flatcc/Config.in
+++ b/package/flatcc/Config.in
@@ -1,8 +1,15 @@
 config BR2_PACKAGE_FLATCC
 	bool "flatcc"
+	# Some components require C++, and C11/C++11 is the reference
+	# expected to always work
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	help
 	  flatcc is C language implementation of Google Flatbuffers. It
 	  consists of both a library for the target as well as a
 	  flatbuffer compiler tool for the host.
 
 	  https://github.com/dvidelabs/flatcc
+
+comment "flatcc needs a toolchain w/ C++11"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] flatcc: add dependency on C++11
  2018-09-06 19:20 [Buildroot] [PATCH] flatcc: add dependency on C++11 Joel Carlson
@ 2018-09-06 19:34 ` Peter Korsgaard
  2018-09-06 19:58   ` Joel Carlson
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2018-09-06 19:34 UTC (permalink / raw)
  To: buildroot

>>>>> "Joel" == Joel Carlson <joelsoncarl@gmail.com> writes:

 > Some of the components built by flatcc require C++. Also, while older
 > toolchains may work, C11/C++11 is the reference that is expected to
 > always work.

 > Fixes
 > http://autobuild.buildroot.net/results/8fb0447eed1d55b7687f657530e31695cf77ce5c/

This is an autobuilder on the next branch. Does this mean that only
0.5.2 is affected and not 0.5.1 (the verison on master)?

 > Signed-off-by: Joel Carlson <JoelsonCarl@gmail.com>
 > ---
 >  package/flatcc/Config.in | 7 +++++++
 >  1 file changed, 7 insertions(+)

 > diff --git a/package/flatcc/Config.in b/package/flatcc/Config.in
 > index 6273f2b..557bd9b 100644
 > --- a/package/flatcc/Config.in
 > +++ b/package/flatcc/Config.in
 > @@ -1,8 +1,15 @@
 >  config BR2_PACKAGE_FLATCC
 >  	bool "flatcc"
 > +	# Some components require C++, and C11/C++11 is the reference
 > +	# expected to always work
 > +	depends on BR2_INSTALL_LIBSTDCPP
 > +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 >  	help
 >  	  flatcc is C language implementation of Google Flatbuffers. It
 >  	  consists of both a library for the target as well as a
 >  	  flatbuffer compiler tool for the host.

It is a bit odd that a "C language implementation" really needs C++. Are
you sure this isn't just for some kind of optional C++ binding?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] flatcc: add dependency on C++11
  2018-09-06 19:34 ` Peter Korsgaard
@ 2018-09-06 19:58   ` Joel Carlson
  2018-09-06 20:43     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Carlson @ 2018-09-06 19:58 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, Sep 6, 2018 at 1:34 PM Peter Korsgaard <peter@korsgaard.com> wrote:
>
> >>>>> "Joel" == Joel Carlson <joelsoncarl@gmail.com> writes:
>
>  > Some of the components built by flatcc require C++. Also, while older
>  > toolchains may work, C11/C++11 is the reference that is expected to
>  > always work.
>
>  > Fixes
>  > http://autobuild.buildroot.net/results/8fb0447eed1d55b7687f657530e31695cf77ce5c/
>
> This is an autobuilder on the next branch. Does this mean that only
> 0.5.2 is affected and not 0.5.1 (the verison on master)?

Sorry, I failed to pay attention to the branches.  This is appropriate
for next, not master.  It looks like some CXX stuff was added into the
CMake files after 0.5.1.

>
>  > Signed-off-by: Joel Carlson <JoelsonCarl@gmail.com>
>  > ---
>  >  package/flatcc/Config.in | 7 +++++++
>  >  1 file changed, 7 insertions(+)
>
>  > diff --git a/package/flatcc/Config.in b/package/flatcc/Config.in
>  > index 6273f2b..557bd9b 100644
>  > --- a/package/flatcc/Config.in
>  > +++ b/package/flatcc/Config.in
>  > @@ -1,8 +1,15 @@
>  >  config BR2_PACKAGE_FLATCC
>  >      bool "flatcc"
>  > +    # Some components require C++, and C11/C++11 is the reference
>  > +    # expected to always work
>  > +    depends on BR2_INSTALL_LIBSTDCPP
>  > +    depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
>  >      help
>  >        flatcc is C language implementation of Google Flatbuffers. It
>  >        consists of both a library for the target as well as a
>  >        flatbuffer compiler tool for the host.
>
> It is a bit odd that a "C language implementation" really needs C++. Are
> you sure this isn't just for some kind of optional C++ binding?

I will dig into this a bit deeper.  The immediate thing I had noticed
was that CMakeLists.txt changed:
- project (FlatCC C)
+ project (FlatCC C CXX)

I only see a single .cpp file, which is in a tests folder.  I will see
if I can pass/set some options so that C++ isn't necessary, and will
send a new patch if I find that to be the case.

>
> --
> Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] flatcc: add dependency on C++11
  2018-09-06 19:58   ` Joel Carlson
@ 2018-09-06 20:43     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-09-06 20:43 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 6 Sep 2018 13:58:15 -0600, Joel Carlson wrote:

> I will dig into this a bit deeper.  The immediate thing I had noticed
> was that CMakeLists.txt changed:
> - project (FlatCC C)
> + project (FlatCC C CXX)
> 
> I only see a single .cpp file, which is in a tests folder.  I will see
> if I can pass/set some options so that C++ isn't necessary, and will
> send a new patch if I find that to be the case.

I see two .cpp files, but indeed both in tests/

$ find . -name '*.cpp'
./test/benchmark/benchflatc/benchflatc.cpp
./test/monster_test_cpp/monster_test.cpp

There is already an option to enable/disable tests:

option(FLATCC_TEST "enable tests" ON)

and we already disable building tests in flatcc.mk:

# Disable build of tests and samples
FLATCC_CONF_OPTS += -DFLATCC_TEST=OFF
HOST_FLATCC_CONF_OPTS += -DFLATCC_TEST=OFF

The CMakeLists.txt needs to be fixed to only require a C++ compiler
when tests are enabled.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-06 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-06 19:20 [Buildroot] [PATCH] flatcc: add dependency on C++11 Joel Carlson
2018-09-06 19:34 ` Peter Korsgaard
2018-09-06 19:58   ` Joel Carlson
2018-09-06 20:43     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox