All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files
@ 2018-08-09  0:26 André Draszik
  2018-08-09  0:26 ` [meta-java][master-next][PATCH 2/4] openjdk-8: speed-up do_install() (pack200) André Draszik
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: André Draszik @ 2018-08-09  0:26 UTC (permalink / raw)
  To: openembedded-devel

From: André Draszik <andre.draszik@jci.com>

Since we run oeqa tests, we get python byte-code in
the source tree here.

Ignore them to clean-up the git status

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 51a512c..8e5c599 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 *.bak
 *.orig
+*.pyc
 *.rej
 *.swp
-- 
2.18.0



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

* [meta-java][master-next][PATCH 2/4] openjdk-8: speed-up do_install() (pack200)
  2018-08-09  0:26 [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
@ 2018-08-09  0:26 ` André Draszik
  2018-08-09  0:26 ` [meta-java][master-next][PATCH 3/4] Revert "openjdk-8: fix build for gcc8.x" André Draszik
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: André Draszik @ 2018-08-09  0:26 UTC (permalink / raw)
  To: openembedded-devel

From: André Draszik <andre.draszik@jci.com>

We run pack200 sequentially on all found archives, but there
doesn't seem to be a reason to do so, the
java_get_parallel_make() apperas to be related to compiling
java itself, running multiple java applications (pack200)
at the same time on the same machine should be possible,
otherwise we have a big problem...

Just run up to BB_NUMBER_THREADS pack200 processes at the same
time to speed up the build.

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index 03cab11..d0b2ec8 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -77,13 +77,13 @@ do_install_append() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'repack', 'true', 'false', d)} ; then
       if [ -d ${D}${JDK_HOME} ] ; then
         find ${D}${JDK_HOME} -name "*.jar" -print0 | \
-          xargs -0 -n1 -P ${@java_get_parallel_make(d)} sh -c ' \
+          xargs -0 -n1 -P ${BB_NUMBER_THREADS} sh -c ' \
               echo "Repacking" "$0" ; \
               pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
       fi
       if [ -d ${D}${JRE_HOME} ] ; then
         find ${D}${JRE_HOME} -name "*.jar" -print0 | \
-          xargs -0 -n1 -P ${@java_get_parallel_make(d)} sh -c ' \
+          xargs -0 -n1 -P ${BB_NUMBER_THREADS} sh -c ' \
               echo "Repacking" "$0" ; \
               pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
       fi
-- 
2.18.0



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

* [meta-java][master-next][PATCH 3/4] Revert "openjdk-8: fix build for gcc8.x"
  2018-08-09  0:26 [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
  2018-08-09  0:26 ` [meta-java][master-next][PATCH 2/4] openjdk-8: speed-up do_install() (pack200) André Draszik
@ 2018-08-09  0:26 ` André Draszik
  2018-08-09  0:26 ` [meta-java][master-next][PATCH 4/4] openjdk-8: update to work with gcc v8 André Draszik
  2018-08-13  7:44 ` [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
  3 siblings, 0 replies; 7+ messages in thread
From: André Draszik @ 2018-08-09  0:26 UTC (permalink / raw)
  To: openembedded-devel

From: André Draszik <andre.draszik@jci.com>

This reverts commit 52fb41cec7d5125bb11c718705158696ffef11f8.

The change being reverted has two problems:
- it still doesn't produce working binaries
- compilation on pre-gcc v7 compilers fails (which is
  relevant for compiling openjdk-8-native, as that
  uses the build machine's gcc, not yocto's gcc):
  | At global scope:
  | cc1plus: error: unrecognized command line option ‘-Wno-stringop-overflow’ [-Werror]
  | cc1plus: all warnings being treated as errors

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 .../openjdk/openjdk-8-release-16xbyy.inc      |  1 -
 .../hotspot_fix_gcc8x_build.patch             | 21 -------------------
 2 files changed, 22 deletions(-)
 delete mode 100644 recipes-core/openjdk/patches-openjdk-8/hotspot_fix_gcc8x_build.patch

diff --git a/recipes-core/openjdk/openjdk-8-release-16xbyy.inc b/recipes-core/openjdk/openjdk-8-release-16xbyy.inc
index fd95e95..c1fcda4 100644
--- a/recipes-core/openjdk/openjdk-8-release-16xbyy.inc
+++ b/recipes-core/openjdk/openjdk-8-release-16xbyy.inc
@@ -16,7 +16,6 @@ PATCHES_URI = "\
     file://0008-jdk-use-correct-include-for-signal.patch \
     file://0009-jdk-disable-backtrace-musl-build-fix.patch \
     file://0010-build-fix-build-on-as-needed-toolchains-generic.patch \
-    file://hotspot_fix_gcc8x_build.patch \
 "
 # some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
 # reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html
diff --git a/recipes-core/openjdk/patches-openjdk-8/hotspot_fix_gcc8x_build.patch b/recipes-core/openjdk/patches-openjdk-8/hotspot_fix_gcc8x_build.patch
deleted file mode 100644
index 1a406f2..0000000
--- a/recipes-core/openjdk/patches-openjdk-8/hotspot_fix_gcc8x_build.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Richard Leitner <richard.leitner@skidata.com>
-Date: Thu, 14 Jun 2018 23:42:11 +0200
-Subject: [PATCH] openjdk-8: hotspot: fix gcc8 compilation
-
-As oe-core/yocto-project master migrated to gcc8.x we need to support this.
-Therefore disable following gcc warnings/errors which caused the build to fail:
-  + stringop-overflow
-  + return-type
----
-
---- a/hotspot/make/linux/makefiles/gcc.make
-+++ b/hotspot/make/linux/makefiles/gcc.make
-@@ -197,7 +197,7 @@
- endif
- 
- # Compiler warnings are treated as errors
--WARNINGS_ARE_ERRORS = -Werror
-+WARNINGS_ARE_ERRORS = -Werror -Wno-stringop-overflow -Wno-error=return-type
- 
- ifeq ($(USE_CLANG), true)
-   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
-- 
2.18.0



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

* [meta-java][master-next][PATCH 4/4] openjdk-8: update to work with gcc v8
  2018-08-09  0:26 [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
  2018-08-09  0:26 ` [meta-java][master-next][PATCH 2/4] openjdk-8: speed-up do_install() (pack200) André Draszik
  2018-08-09  0:26 ` [meta-java][master-next][PATCH 3/4] Revert "openjdk-8: fix build for gcc8.x" André Draszik
@ 2018-08-09  0:26 ` André Draszik
  2018-08-09 10:46   ` André Draszik
  2018-08-13  7:44 ` [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
  3 siblings, 1 reply; 7+ messages in thread
From: André Draszik @ 2018-08-09  0:26 UTC (permalink / raw)
  To: openembedded-devel

From: André Draszik <andre.draszik@jci.com>

Similar to the existing gcc-6 and gcc-7 support, we need to
add the same specific compiler flags to avoid miscompilation
on gcc-8:
  -fno-lifetime-dse
  -fno-delete-null-pointer-checks

In addition, gcc v8 introduces new warnings (which are
treated as errors), which we can just silence for the
time being:

| <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:223:32: error: control reaches end of non-void function [-Werror=return-type]
|  #define BREAKPOINT ::breakpoint()
|                     ~~~~~~~~~~~~^~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/debug.hpp:192:3: note: in expansion of macro 'BREAKPOINT'
|    BREAKPOINT;                                                                \
|    ^~~~~~~~~~
| <<PKGBUILDDIR>>/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp:197:2: note: in expansion of macro 'ShouldNotReachHere'
|   ShouldNotReachHere();
|   ^~~~~~~~~~~~~~~~~~
etc.

And
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3811:14: error: 'char* strncat(char*, const char*, size_t)' specified bound 1 equals source length [-Werror=stringop-overflow=]
|        strncat(shared_archive_path, os::file_separator(), file_sep_len);
|        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp: In static member function 'static void Arguments::fix_appclasspath()':
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
|      strncpy(copy, src, strlen(src) + 1);
|      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:30: note: length computed here
|      strncpy(copy, src, strlen(src) + 1);
|                         ~~~~~~^~~~~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
|      strncpy(copy, src, strlen(src) + 1);
|      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:30: note: length computed here
|      strncpy(copy, src, strlen(src) + 1);
|                         ~~~~~~^~~~~
etc.

With this,
    bitbake -c testimage openjdk-8-test-image
works again:
RESULTS:
RESULTS - ping.PingTest.test_ping - Testcase 964: PASSED (0.12s)
RESULTS - ssh.SSHTest.test_ssh - Testcase 224: PASSED (1.20s)
RESULTS - java.JavaTest.test_java_exists - Testcase -1: PASSED (0.15s)
RESULTS - java.JavaTest.test_java_jar_comp_mode - Testcase -1: PASSED (41.98s)
RESULTS - java.JavaTest.test_java_jar_int_mode - Testcase -1: PASSED (1.76s)
RESULTS - java.JavaTest.test_java_jar_works - Testcase -1: PASSED (2.13s)
RESULTS - java.JavaTest.test_java_version - Testcase -1: PASSED (1.51s)
RESULTS - javac.JavacTest.test_javac_exists - Testcase -1: PASSED (0.11s)
RESULTS - javac.JavacTest.test_javac_works - Testcase -1: PASSED (17.64s)
SUMMARY:
openjdk-8-test-image () - Ran 9 tests in 67.112s
openjdk-8-test-image - OK - All required tests passed

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 recipes-core/openjdk/openjdk-8-common.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index 3b328e9..79af54a 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -216,6 +216,7 @@ EXTRA_OECONF_append = "\
 # of these changes.
 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 -Wno-error=stringop-overflow -Wno-error=return-type"
 
 # All supported cross compilers support the compiler flags that were
 # added to make compilation with gcc6 work. But the host compiler for
-- 
2.18.0



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

* Re: [meta-java][master-next][PATCH 4/4] openjdk-8: update to work with gcc v8
  2018-08-09  0:26 ` [meta-java][master-next][PATCH 4/4] openjdk-8: update to work with gcc v8 André Draszik
@ 2018-08-09 10:46   ` André Draszik
  0 siblings, 0 replies; 7+ messages in thread
From: André Draszik @ 2018-08-09 10:46 UTC (permalink / raw)
  To: openembedded-devel

Argh, this last one still doesn't work, because of weird CFLAGS / CXXFLAGS
in this recipe :-(

We end up adding command line options to gcc based on the cross gcc version,
but openjdk uses the same ones for native tools compilation, which fails.

A,


On Thu, 2018-08-09 at 01:26 +0100, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
> 
> Similar to the existing gcc-6 and gcc-7 support, we need to
> add the same specific compiler flags to avoid miscompilation
> on gcc-8:
>   -fno-lifetime-dse
>   -fno-delete-null-pointer-checks
> 
> In addition, gcc v8 introduces new warnings (which are
> treated as errors), which we can just silence for the
> time being:
> 
> > <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
> > :223:32: error: control reaches end of non-void function [-
> > Werror=return-type]
> >  #define BREAKPOINT ::breakpoint()
> >                     ~~~~~~~~~~~~^~
> > <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/debug.hpp:192:3: note: in
> > expansion of macro 'BREAKPOINT'
> >    BREAKPOINT;                                                          
> >       \
> >    ^~~~~~~~~~
> > <<PKGBUILDDIR>>/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp:1
> > 97:2: note: in expansion of macro 'ShouldNotReachHere'
> >   ShouldNotReachHere();
> >   ^~~~~~~~~~~~~~~~~~
> 
> etc.
> 
> And
> > <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3811:14:
> > error: 'char* strncat(char*, const char*, size_t)' specified bound 1
> > equals source length [-Werror=stringop-overflow=]
> >        strncat(shared_archive_path, os::file_separator(), file_sep_len);
> >        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp: In static
> > member function 'static void Arguments::fix_appclasspath()':
> > <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:12:
> > error: 'char* strncpy(char*, const char*, size_t)' specified bound
> > depends on the length of the source argument [-Werror=stringop-
> > overflow=]
> >      strncpy(copy, src, strlen(src) + 1);
> >      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:30:
> > note: length computed here
> >      strncpy(copy, src, strlen(src) + 1);
> >                         ~~~~~~^~~~~
> > <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:12:
> > error: 'char* strncpy(char*, const char*, size_t)' specified bound
> > depends on the length of the source argument [-Werror=stringop-
> > overflow=]
> >      strncpy(copy, src, strlen(src) + 1);
> >      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:30:
> > note: length computed here
> >      strncpy(copy, src, strlen(src) + 1);
> >                         ~~~~~~^~~~~
> 
> etc.
> 
> With this,
>     bitbake -c testimage openjdk-8-test-image
> works again:
> RESULTS:
> RESULTS - ping.PingTest.test_ping - Testcase 964: PASSED (0.12s)
> RESULTS - ssh.SSHTest.test_ssh - Testcase 224: PASSED (1.20s)
> RESULTS - java.JavaTest.test_java_exists - Testcase -1: PASSED (0.15s)
> RESULTS - java.JavaTest.test_java_jar_comp_mode - Testcase -1: PASSED
> (41.98s)
> RESULTS - java.JavaTest.test_java_jar_int_mode - Testcase -1: PASSED
> (1.76s)
> RESULTS - java.JavaTest.test_java_jar_works - Testcase -1: PASSED (2.13s)
> RESULTS - java.JavaTest.test_java_version - Testcase -1: PASSED (1.51s)
> RESULTS - javac.JavacTest.test_javac_exists - Testcase -1: PASSED (0.11s)
> RESULTS - javac.JavacTest.test_javac_works - Testcase -1: PASSED (17.64s)
> SUMMARY:
> openjdk-8-test-image () - Ran 9 tests in 67.112s
> openjdk-8-test-image - OK - All required tests passed
> 
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
>  recipes-core/openjdk/openjdk-8-common.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-
> core/openjdk/openjdk-8-common.inc
> index 3b328e9..79af54a 100644
> --- a/recipes-core/openjdk/openjdk-8-common.inc
> +++ b/recipes-core/openjdk/openjdk-8-common.inc
> @@ -216,6 +216,7 @@ EXTRA_OECONF_append = "\
>  # of these changes.
>  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 -Wno-
> error=stringop-overflow -Wno-error=return-type"
>  
>  # All supported cross compilers support the compiler flags that were
>  # added to make compilation with gcc6 work. But the host compiler for


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

* Re: [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files
  2018-08-09  0:26 [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
                   ` (2 preceding siblings ...)
  2018-08-09  0:26 ` [meta-java][master-next][PATCH 4/4] openjdk-8: update to work with gcc v8 André Draszik
@ 2018-08-13  7:44 ` André Draszik
  2018-08-13  8:16   ` Richard Leitner
  3 siblings, 1 reply; 7+ messages in thread
From: André Draszik @ 2018-08-13  7:44 UTC (permalink / raw)
  To: openembedded-devel

Please ignore this series, I'll send a mew one.

A.

On Thu, 2018-08-09 at 01:26 +0100, André Draszik wrote:
> From: André Draszik <andre.draszik@jci.com>
> 
> Since we run oeqa tests, we get python byte-code in
> the source tree here.
> 
> Ignore them to clean-up the git status
> 
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.gitignore b/.gitignore
> index 51a512c..8e5c599 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1,4 +1,5 @@
>  *.bak
>  *.orig
> +*.pyc
>  *.rej
>  *.swp


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

* Re: [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files
  2018-08-13  7:44 ` [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
@ 2018-08-13  8:16   ` Richard Leitner
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Leitner @ 2018-08-13  8:16 UTC (permalink / raw)
  To: openembedded-devel


On 8/13/18 9:44 AM, André Draszik wrote:
> Please ignore this series, I'll send a mew one.

ok. thanks for the info.

regards;Richard.L


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

end of thread, other threads:[~2018-08-13  8:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09  0:26 [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
2018-08-09  0:26 ` [meta-java][master-next][PATCH 2/4] openjdk-8: speed-up do_install() (pack200) André Draszik
2018-08-09  0:26 ` [meta-java][master-next][PATCH 3/4] Revert "openjdk-8: fix build for gcc8.x" André Draszik
2018-08-09  0:26 ` [meta-java][master-next][PATCH 4/4] openjdk-8: update to work with gcc v8 André Draszik
2018-08-09 10:46   ` André Draszik
2018-08-13  7:44 ` [meta-java][master-next][PATCH 1/4] gitignore: ignore new python byte-code files André Draszik
2018-08-13  8:16   ` 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.