Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9
@ 2019-12-04 21:49 aduskett at gmail.com
  2019-12-04 21:54 ` Adam Duskett
  2019-12-06 22:45 ` Thomas Petazzoni
  0 siblings, 2 replies; 7+ messages in thread
From: aduskett at gmail.com @ 2019-12-04 21:49 UTC (permalink / raw)
  To: buildroot

From: Adam Duskett <aduskett@greenlots.com>

If GCC on the host is older than 4.9, during the configure stage an
error is thrown such as:

checking whether the host C compiler can be used... no
ERROR: Only GCC 4.9 or newer is supported (found version 4.8.2).

Depend on the host gcc version being >= 4.9

Fixes:
http://autobuild.buildroot.net/results/192661452fd522bf46b23d5a7a522eb853a984bf

Signed-off-by: Adam Duskett <aduskett@greenlots.com>
---
 package/spidermonkey/Config.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/spidermonkey/Config.in b/package/spidermonkey/Config.in
index 284502f618..5f12110626 100644
--- a/package/spidermonkey/Config.in
+++ b/package/spidermonkey/Config.in
@@ -16,6 +16,7 @@ config BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS
 
 config BR2_PACKAGE_SPIDERMONKEY
 	bool "spidermonkey"
+	depends on BR2_HOST_GCC_AT_LEAST_4_9
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
@@ -43,5 +44,6 @@ comment "spidermonkey needs a glibc or musl toolchain with C++, wchar, dynamic l
 		!BR2_INSTALL_LIBSTDCPP || \
 		BR2_STATIC_LIBS || \
 		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
+		!BR2_HOST_GCC_AT_LEAST_4_9 || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
 		!BR2_USE_WCHAR
-- 
2.23.0

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

* [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9
  2019-12-04 21:49 [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9 aduskett at gmail.com
@ 2019-12-04 21:54 ` Adam Duskett
  2019-12-05 20:58   ` Thomas Petazzoni
  2019-12-06 22:45 ` Thomas Petazzoni
  1 sibling, 1 reply; 7+ messages in thread
From: Adam Duskett @ 2019-12-04 21:54 UTC (permalink / raw)
  To: buildroot

Before this get's added I do want to make another suggestion:

Open embedded also has a patch that reverts the reliance on C++14
back to C++11, allowing the host GCC version to be >= 4.8.

https://github.com/openembedded/meta-openembedded/blob/master/meta-oe/recipes-extended/mozjs/mozjs/fallback-to-2011-C%2B%2B-standard.patch

If this is a better option let me know and I will instead re-submit the patch
to include this patch.

Thanks!

Adam

On Wed, Dec 4, 2019 at 1:49 PM <aduskett@gmail.com> wrote:
>
> From: Adam Duskett <aduskett@greenlots.com>
>
> If GCC on the host is older than 4.9, during the configure stage an
> error is thrown such as:
>
> checking whether the host C compiler can be used... no
> ERROR: Only GCC 4.9 or newer is supported (found version 4.8.2).
>
> Depend on the host gcc version being >= 4.9
>
> Fixes:
> http://autobuild.buildroot.net/results/192661452fd522bf46b23d5a7a522eb853a984bf
>
> Signed-off-by: Adam Duskett <aduskett@greenlots.com>
> ---
>  package/spidermonkey/Config.in | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/package/spidermonkey/Config.in b/package/spidermonkey/Config.in
> index 284502f618..5f12110626 100644
> --- a/package/spidermonkey/Config.in
> +++ b/package/spidermonkey/Config.in
> @@ -16,6 +16,7 @@ config BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS
>
>  config BR2_PACKAGE_SPIDERMONKEY
>         bool "spidermonkey"
> +       depends on BR2_HOST_GCC_AT_LEAST_4_9
>         depends on BR2_INSTALL_LIBSTDCPP
>         depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
>         depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> @@ -43,5 +44,6 @@ comment "spidermonkey needs a glibc or musl toolchain with C++, wchar, dynamic l
>                 !BR2_INSTALL_LIBSTDCPP || \
>                 BR2_STATIC_LIBS || \
>                 !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
> +               !BR2_HOST_GCC_AT_LEAST_4_9 || \
>                 !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
>                 !BR2_USE_WCHAR
> --
> 2.23.0
>

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

* [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9
  2019-12-04 21:54 ` Adam Duskett
@ 2019-12-05 20:58   ` Thomas Petazzoni
  2019-12-05 23:02     ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2019-12-05 20:58 UTC (permalink / raw)
  To: buildroot

On Wed, 4 Dec 2019 13:54:41 -0800
Adam Duskett <aduskett@gmail.com> wrote:

> Before this get's added I do want to make another suggestion:
> 
> Open embedded also has a patch that reverts the reliance on C++14
> back to C++11, allowing the host GCC version to be >= 4.8.
> 
> https://github.com/openembedded/meta-openembedded/blob/master/meta-oe/recipes-extended/mozjs/mozjs/fallback-to-2011-C%2B%2B-standard.patch

So what this patch seems to imply is that in fact gcc 4.9 is not really
required by the spidermonkey code. If that's the case, then yes I
believe having the patch is probably nicer than having to propagate the
dependency.

Thanks!

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

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

* [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9
  2019-12-05 20:58   ` Thomas Petazzoni
@ 2019-12-05 23:02     ` Arnout Vandecappelle
  2019-12-06  8:01       ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2019-12-05 23:02 UTC (permalink / raw)
  To: buildroot



On 05/12/2019 21:58, Thomas Petazzoni wrote:
> On Wed, 4 Dec 2019 13:54:41 -0800
> Adam Duskett <aduskett@gmail.com> wrote:
> 
>> Before this get's added I do want to make another suggestion:
>>
>> Open embedded also has a patch that reverts the reliance on C++14
>> back to C++11, allowing the host GCC version to be >= 4.8.
>>
>> https://github.com/openembedded/meta-openembedded/blob/master/meta-oe/recipes-extended/mozjs/mozjs/fallback-to-2011-C%2B%2B-standard.patch
> 
> So what this patch seems to imply is that in fact gcc 4.9 is not really
> required by the spidermonkey code. If that's the case, then yes I
> believe having the patch is probably nicer than having to propagate the
> dependency.

 As I understand it, spidermonkey *does* use C++14 features (hence the need for
target GCC 4.9+). However, it also builds host tools which need only C++11
features, but the test is applied to host and target compiler indiscriminately.
The patch doesn't make a correct distinction between host and target, it just
generally lowers the minimum C++ version.

 Now, given that they assume C++14 support is available, it's relatively likely
that they'll start using those features in future versions. At that point.
things will anyway break and we need this condition. So I'd say, byte the bullet
now and require hsot and target GCC >= 4.9.

 Regards,
 Arnout

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

* [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9
  2019-12-05 23:02     ` Arnout Vandecappelle
@ 2019-12-06  8:01       ` Thomas Petazzoni
  2019-12-06 22:30         ` Adam Duskett
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2019-12-06  8:01 UTC (permalink / raw)
  To: buildroot

On Fri, 6 Dec 2019 00:02:44 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:

> > So what this patch seems to imply is that in fact gcc 4.9 is not really
> > required by the spidermonkey code. If that's the case, then yes I
> > believe having the patch is probably nicer than having to propagate the
> > dependency.  
> 
>  As I understand it, spidermonkey *does* use C++14 features (hence the need for
> target GCC 4.9+). However, it also builds host tools which need only C++11
> features, but the test is applied to host and target compiler indiscriminately.
> The patch doesn't make a correct distinction between host and target, it just
> generally lowers the minimum C++ version.

Ah, that's not good indeed.

>  Now, given that they assume C++14 support is available, it's relatively likely
> that they'll start using those features in future versions. At that point.
> things will anyway break and we need this condition. So I'd say, byte the bullet
> now and require hsot and target GCC >= 4.9.

Fair enough. We need to resurrect the patch then, because I changed its
state to Changes Requested yesterday.

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

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

* [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9
  2019-12-06  8:01       ` Thomas Petazzoni
@ 2019-12-06 22:30         ` Adam Duskett
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Duskett @ 2019-12-06 22:30 UTC (permalink / raw)
  To: buildroot

I changed the patch back to new.

Adam

On Fri, Dec 6, 2019 at 12:01 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Fri, 6 Dec 2019 00:02:44 +0100
> Arnout Vandecappelle <arnout@mind.be> wrote:
>
> > > So what this patch seems to imply is that in fact gcc 4.9 is not really
> > > required by the spidermonkey code. If that's the case, then yes I
> > > believe having the patch is probably nicer than having to propagate the
> > > dependency.
> >
> >  As I understand it, spidermonkey *does* use C++14 features (hence the need for
> > target GCC 4.9+). However, it also builds host tools which need only C++11
> > features, but the test is applied to host and target compiler indiscriminately.
> > The patch doesn't make a correct distinction between host and target, it just
> > generally lowers the minimum C++ version.
>
> Ah, that's not good indeed.
>
> >  Now, given that they assume C++14 support is available, it's relatively likely
> > that they'll start using those features in future versions. At that point.
> > things will anyway break and we need this condition. So I'd say, byte the bullet
> > now and require hsot and target GCC >= 4.9.
>
> Fair enough. We need to resurrect the patch then, because I changed its
> state to Changes Requested yesterday.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9
  2019-12-04 21:49 [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9 aduskett at gmail.com
  2019-12-04 21:54 ` Adam Duskett
@ 2019-12-06 22:45 ` Thomas Petazzoni
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2019-12-06 22:45 UTC (permalink / raw)
  To: buildroot

On Wed,  4 Dec 2019 13:49:13 -0800
aduskett at gmail.com wrote:

> From: Adam Duskett <aduskett@greenlots.com>
> 
> If GCC on the host is older than 4.9, during the configure stage an
> error is thrown such as:
> 
> checking whether the host C compiler can be used... no
> ERROR: Only GCC 4.9 or newer is supported (found version 4.8.2).
> 
> Depend on the host gcc version being >= 4.9
> 
> Fixes:
> http://autobuild.buildroot.net/results/192661452fd522bf46b23d5a7a522eb853a984bf
> 
> Signed-off-by: Adam Duskett <aduskett@greenlots.com>
> ---
>  package/spidermonkey/Config.in | 2 ++
>  1 file changed, 2 insertions(+)

Applied to master, thanks.

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

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

end of thread, other threads:[~2019-12-06 22:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-04 21:49 [Buildroot] [PATCH 1/1] package/spidermonkey: depends on host gcc >= 4.9 aduskett at gmail.com
2019-12-04 21:54 ` Adam Duskett
2019-12-05 20:58   ` Thomas Petazzoni
2019-12-05 23:02     ` Arnout Vandecappelle
2019-12-06  8:01       ` Thomas Petazzoni
2019-12-06 22:30         ` Adam Duskett
2019-12-06 22:45 ` Thomas Petazzoni

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