All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version
@ 2020-04-30 13:15 Jacob Kroon
  2020-04-30 13:15 ` [PATCH][meta-java 2/3] icedtea7-native: Fix building with GCC 10 Jacob Kroon
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jacob Kroon @ 2020-04-30 13:15 UTC (permalink / raw)
  To: openembedded-devel

GCC in Fedora 32 is up to version 10, so return the whole word
instead of the first letter.

Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
---
 classes/openjdk-build-helper.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass
index 8d83e02..4e334c2 100644
--- a/classes/openjdk-build-helper.bbclass
+++ b/classes/openjdk-build-helper.bbclass
@@ -31,7 +31,7 @@ def openjdk_build_helper_get_build_cflags(d):
         from subprocess import Popen, PIPE
         cmd = d.expand('%s -dumpversion' % build_cc).split()
         cc = Popen(cmd, stdout=PIPE, stderr=PIPE)
-        return cc.communicate()[0].decode('utf-8')[0]
+        return cc.communicate()[0].decode('utf-8').split()[0]
 
     build_cc = d.getVar('BUILD_CC')
     version = get_build_cc_version(build_cc)
-- 
2.26.2


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

* [PATCH][meta-java 2/3] icedtea7-native: Fix building with GCC 10
  2020-04-30 13:15 [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version Jacob Kroon
@ 2020-04-30 13:15 ` Jacob Kroon
  2020-04-30 13:15 ` [PATCH][meta-java 3/3] openjdk-8: " Jacob Kroon
  2020-05-01  9:24 ` [oe] [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version Richard Leitner
  2 siblings, 0 replies; 7+ messages in thread
From: Jacob Kroon @ 2020-04-30 13:15 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
---
 recipes-core/icedtea/icedtea7-native.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
index 8d0dc71..b0b9419 100644
--- a/recipes-core/icedtea/icedtea7-native.inc
+++ b/recipes-core/icedtea/icedtea7-native.inc
@@ -28,6 +28,9 @@ CXX_append = " -std=gnu++98"
 # WORKAROUND: ignore errors from new compilers
 CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
 
+# Explicitly pass -fcommon since GCC 10 defaults to -fno-common for C sources
+CFLAGS_append = " -fcommon"
+
 inherit native java autotools pkgconfig
 inherit openjdk-build-helper
 inherit python3native
-- 
2.26.2


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

* [PATCH][meta-java 3/3] openjdk-8: Fix building with GCC 10
  2020-04-30 13:15 [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version Jacob Kroon
  2020-04-30 13:15 ` [PATCH][meta-java 2/3] icedtea7-native: Fix building with GCC 10 Jacob Kroon
@ 2020-04-30 13:15 ` Jacob Kroon
  2020-04-30 21:10   ` [oe] " Richard Leitner
  2020-05-01  9:24 ` [oe] [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version Richard Leitner
  2 siblings, 1 reply; 7+ messages in thread
From: Jacob Kroon @ 2020-04-30 13:15 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
---
 recipes-core/openjdk/openjdk-8-common.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index d8b30b8..5228338 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -176,6 +176,10 @@ FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC9 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
+FLAGS_GCC10 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
+
+# GCC 10 defaults to -fno-common, but OpenJDK 8 is not ready for this.
+FLAGS_GCC10_append = " -fcommon"
 
 # flags for -native, and for bits that need a host-tool during -cross
 BUILD_CFLAGS_append = " ${@openjdk_build_helper_get_build_cflags(d)}"
-- 
2.26.2


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

* Re: [oe] [PATCH][meta-java 3/3] openjdk-8: Fix building with GCC 10
  2020-04-30 13:15 ` [PATCH][meta-java 3/3] openjdk-8: " Jacob Kroon
@ 2020-04-30 21:10   ` Richard Leitner
  2020-05-01  7:50     ` Jacob Kroon
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Leitner @ 2020-04-30 21:10 UTC (permalink / raw)
  To: openembedded-devel; +Cc: jacob.kroon

Hi Jacob,
thanks for the patch!

On Thu, Apr 30, 2020 at 03:15:56PM +0200, Jacob Kroon wrote:
> Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
> ---
>  recipes-core/openjdk/openjdk-8-common.inc | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
> index d8b30b8..5228338 100644
> --- a/recipes-core/openjdk/openjdk-8-common.inc
> +++ b/recipes-core/openjdk/openjdk-8-common.inc
> @@ -176,6 +176,10 @@ FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>  FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>  FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>  FLAGS_GCC9 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
> +FLAGS_GCC10 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
> +
> +# GCC 10 defaults to -fno-common, but OpenJDK 8 is not ready for this.
> +FLAGS_GCC10_append = " -fcommon"

Does setting "-fcommon" also work for GCC version > 5 and < 10? In
icedtea7-native you've appended it to CFLAGS it w/o GCC version.

Background of the question is that I'm currently planning to drop
support for GCC versions < 6 in the recipes. If done so, we currently
have no need for version specific flags. Just want to check if that
would be an exception. Thanks.

regards;rl

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

* Re: [oe] [PATCH][meta-java 3/3] openjdk-8: Fix building with GCC 10
  2020-04-30 21:10   ` [oe] " Richard Leitner
@ 2020-05-01  7:50     ` Jacob Kroon
  2020-05-01  9:19       ` Richard Leitner
  0 siblings, 1 reply; 7+ messages in thread
From: Jacob Kroon @ 2020-05-01  7:50 UTC (permalink / raw)
  To: Richard Leitner, openembedded-devel

On 4/30/20 11:10 PM, Richard Leitner wrote:
> Hi Jacob,
> thanks for the patch!
> 
> On Thu, Apr 30, 2020 at 03:15:56PM +0200, Jacob Kroon wrote:
>> Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
>> ---
>>   recipes-core/openjdk/openjdk-8-common.inc | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
>> index d8b30b8..5228338 100644
>> --- a/recipes-core/openjdk/openjdk-8-common.inc
>> +++ b/recipes-core/openjdk/openjdk-8-common.inc
>> @@ -176,6 +176,10 @@ FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>>   FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>>   FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>>   FLAGS_GCC9 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>> +FLAGS_GCC10 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
>> +
>> +# GCC 10 defaults to -fno-common, but OpenJDK 8 is not ready for this.
>> +FLAGS_GCC10_append = " -fcommon"
> 
> Does setting "-fcommon" also work for GCC version > 5 and < 10? In
> icedtea7-native you've appended it to CFLAGS it w/o GCC version.
> 
> Background of the question is that I'm currently planning to drop
> support for GCC versions < 6 in the recipes. If done so, we currently
> have no need for version specific flags. Just want to check if that
> would be an exception. Thanks.
> 
> regards;rl
> 

A quick check shows that support for -fcommon/-fno-common exists since 
at least gcc 4.7.2:
https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Code-Gen-Options.html
So yes, it should work for 5 < GCC version < 10.

/Jacob

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

* Re: [oe] [PATCH][meta-java 3/3] openjdk-8: Fix building with GCC 10
  2020-05-01  7:50     ` Jacob Kroon
@ 2020-05-01  9:19       ` Richard Leitner
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Leitner @ 2020-05-01  9:19 UTC (permalink / raw)
  To: Jacob Kroon; +Cc: openembedded-devel

On Fri, May 01, 2020 at 09:50:21AM +0200, Jacob Kroon wrote:
> On 4/30/20 11:10 PM, Richard Leitner wrote:
> > Hi Jacob,
> > thanks for the patch!
> > 
> > On Thu, Apr 30, 2020 at 03:15:56PM +0200, Jacob Kroon wrote:
> > > Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
> > > ---
> > >   recipes-core/openjdk/openjdk-8-common.inc | 4 ++++
> > >   1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
> > > index d8b30b8..5228338 100644
> > > --- a/recipes-core/openjdk/openjdk-8-common.inc
> > > +++ b/recipes-core/openjdk/openjdk-8-common.inc
> > > @@ -176,6 +176,10 @@ FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
> > >   FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
> > >   FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
> > >   FLAGS_GCC9 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
> > > +FLAGS_GCC10 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
> > > +
> > > +# GCC 10 defaults to -fno-common, but OpenJDK 8 is not ready for this.
> > > +FLAGS_GCC10_append = " -fcommon"
> > 
> > Does setting "-fcommon" also work for GCC version > 5 and < 10? In
> > icedtea7-native you've appended it to CFLAGS it w/o GCC version.
> > 
> > Background of the question is that I'm currently planning to drop
> > support for GCC versions < 6 in the recipes. If done so, we currently
> > have no need for version specific flags. Just want to check if that
> > would be an exception. Thanks.
> > 
> > regards;rl
> > 
> 
> A quick check shows that support for -fcommon/-fno-common exists since at
> least gcc 4.7.2:
> https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Code-Gen-Options.html
> So yes, it should work for 5 < GCC version < 10.

Great. Thanks for checking.
Then I'll take your series as-it-is and will rebase my local patches on
yours.

regards;rl


> 
> /Jacob

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

* Re: [oe] [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version
  2020-04-30 13:15 [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version Jacob Kroon
  2020-04-30 13:15 ` [PATCH][meta-java 2/3] icedtea7-native: Fix building with GCC 10 Jacob Kroon
  2020-04-30 13:15 ` [PATCH][meta-java 3/3] openjdk-8: " Jacob Kroon
@ 2020-05-01  9:24 ` Richard Leitner
  2 siblings, 0 replies; 7+ messages in thread
From: Richard Leitner @ 2020-05-01  9:24 UTC (permalink / raw)
  To: openembedded-devel

Applied the whole series to master-next.
I will merge it to master after some tests. Thanks!

regards;rl

On Thu, Apr 30, 2020 at 03:15:54PM +0200, Jacob Kroon wrote:
> GCC in Fedora 32 is up to version 10, so return the whole word
> instead of the first letter.
> 
> Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
> ---
>  classes/openjdk-build-helper.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass
> index 8d83e02..4e334c2 100644
> --- a/classes/openjdk-build-helper.bbclass
> +++ b/classes/openjdk-build-helper.bbclass
> @@ -31,7 +31,7 @@ def openjdk_build_helper_get_build_cflags(d):
>          from subprocess import Popen, PIPE
>          cmd = d.expand('%s -dumpversion' % build_cc).split()
>          cc = Popen(cmd, stdout=PIPE, stderr=PIPE)
> -        return cc.communicate()[0].decode('utf-8')[0]
> +        return cc.communicate()[0].decode('utf-8').split()[0]
>  
>      build_cc = d.getVar('BUILD_CC')
>      version = get_build_cc_version(build_cc)
> -- 
> 2.26.2
> 

> 


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

end of thread, other threads:[~2020-05-01  9:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 13:15 [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version Jacob Kroon
2020-04-30 13:15 ` [PATCH][meta-java 2/3] icedtea7-native: Fix building with GCC 10 Jacob Kroon
2020-04-30 13:15 ` [PATCH][meta-java 3/3] openjdk-8: " Jacob Kroon
2020-04-30 21:10   ` [oe] " Richard Leitner
2020-05-01  7:50     ` Jacob Kroon
2020-05-01  9:19       ` Richard Leitner
2020-05-01  9:24 ` [oe] [PATCH][meta-java 1/3] openjdk-build-helper: Fix decoding GCC major version Richard Leitner

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.