diff mbox series

[2/8] support/dependencies: check that host have gcc plugin headers

Message ID 20200519072850.898877-3-kamel.bouhara@bootlin.com
State New
Headers show
Series ODB: C++ Object-Relational Mapping (ORM): New packages. | expand

Commit Message

Kamel Bouhara May 19, 2020, 7:28 a.m. UTC
Some packages requires host gcc headers to build gcc plugins. This
checks they are indeed installed.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
 support/dependencies/dependencies.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Thomas Petazzoni May 19, 2020, 8:14 a.m. UTC | #1
On Tue, 19 May 2020 09:28:44 +0200
Kamel Bouhara <kamel.bouhara@bootlin.com> wrote:

> Some packages requires host gcc headers to build gcc plugins. This
> checks they are indeed installed.
> 
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>

This should have been squashed with PATCH 3/8.

> diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
> index 98469bd70c..fcf52818f1 100755
> --- a/support/dependencies/dependencies.sh
> +++ b/support/dependencies/dependencies.sh
> @@ -240,6 +240,16 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
>  	fi
>  fi
>  
> +if grep ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then
> +	if ! echo "#include <gcc-plugin.h>" | g++ -I$(g++ -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then

use $HOSTCXX_NOCCACHE instead of g++.

No need to send a new iteration just for that, it can be fixed when
applying.

Thanks,

Thomas
Kamel Bouhara May 25, 2020, 9:01 a.m. UTC | #2
On Tue, May 19, 2020 at 10:14:55AM +0200, Thomas Petazzoni wrote:
> On Tue, 19 May 2020 09:28:44 +0200
> Kamel Bouhara <kamel.bouhara@bootlin.com> wrote:
>
> > Some packages requires host gcc headers to build gcc plugins. This
> > checks they are indeed installed.
> >
> > Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
>
> This should have been squashed with PATCH 3/8.
>

My bad I did not understood that.

> > diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
> > index 98469bd70c..fcf52818f1 100755
> > --- a/support/dependencies/dependencies.sh
> > +++ b/support/dependencies/dependencies.sh
> > @@ -240,6 +240,16 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
> >  	fi
> >  fi
> >
> > +if grep ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then
> > +	if ! echo "#include <gcc-plugin.h>" | g++ -I$(g++ -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then
>
> use $HOSTCXX_NOCCACHE instead of g++.
>
> No need to send a new iteration just for that, it can be fixed when
> applying.
>

OK, thanks.

Kamel

> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

--
Kamel Bouhara, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
diff mbox series

Patch

diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 98469bd70c..fcf52818f1 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -240,6 +240,16 @@  if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
 	fi
 fi
 
+if grep ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then
+	if ! echo "#include <gcc-plugin.h>" | g++ -I$(g++ -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then
+		echo
+		echo "Your Buildroot configuration needs a compiler capable of building gcc plugins."
+		echo "If you're running a Debian/Ubuntu distribution, install gcc-X-plugin-dev package."
+		echo "For other distributions, refer to their documentation."
+		exit 1 ;
+	fi
+fi
+
 # Check that the Perl installation is complete enough for Buildroot.
 required_perl_modules="Data::Dumper" # Needed to build host-autoconf
 required_perl_modules="$required_perl_modules ExtUtils::MakeMaker" # Used by host-libxml-parser-perl