[oe] [meta-java][PATCH v2] openjdk-8: Fix QA error caused by a missing hash

2016-08-23 Thread Erkka Kääriä
EXTRA_LDFLAGS were not used when building certain shared objects. This
means that the Yocto specific linker flags were lost, which caused build
failures due to a bad hash style QA error.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjdk-8_102b14.bb   |  1 +
 recipes-core/openjdk/openjre-8_102b14.bb   |  1 +
 .../openjdk8-add-missing-linker-flags.patch| 57 ++
 3 files changed, 59 insertions(+)
 create mode 100644 
recipes-core/openjdk/patches-openjdk-8/openjdk8-add-missing-linker-flags.patch

diff --git a/recipes-core/openjdk/openjdk-8_102b14.bb 
b/recipes-core/openjdk/openjdk-8_102b14.bb
index 79c4cda..210c897 100644
--- a/recipes-core/openjdk/openjdk-8_102b14.bb
+++ b/recipes-core/openjdk/openjdk-8_102b14.bb
@@ -12,6 +12,7 @@ PATCHES_URI_append = "\
 file://openjdk8-fix-adlc-flags.patch;apply=no \
 file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
 file://openjdk8-fix-zero-mode-crash.patch;apply=no \
+file://openjdk8-add-missing-linker-flags.patch;apply=no \
 "
 
 do_install() {
diff --git a/recipes-core/openjdk/openjre-8_102b14.bb 
b/recipes-core/openjdk/openjre-8_102b14.bb
index 736269d..88160e1 100644
--- a/recipes-core/openjdk/openjre-8_102b14.bb
+++ b/recipes-core/openjdk/openjre-8_102b14.bb
@@ -12,6 +12,7 @@ PATCHES_URI_append = "\
 file://openjdk8-fix-adlc-flags.patch;apply=no \
 file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
 file://openjdk8-fix-zero-mode-crash.patch;apply=no \
+file://openjdk8-add-missing-linker-flags.patch;apply=no \
 "
 
 do_install() {
diff --git 
a/recipes-core/openjdk/patches-openjdk-8/openjdk8-add-missing-linker-flags.patch
 
b/recipes-core/openjdk/patches-openjdk-8/openjdk8-add-missing-linker-flags.patch
new file mode 100644
index 000..92f29b0
--- /dev/null
+++ 
b/recipes-core/openjdk/patches-openjdk-8/openjdk8-add-missing-linker-flags.patch
@@ -0,0 +1,57 @@
+makefiles: Add missing EXTRA_LDFLAGS to certain files
+
+EXTRA_LDFLAGS were not used when building certain shared objects. This
+means that the Yocto specific linker flags were lost, which caused build
+failures due to a bad hash style.
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+
+Upstream-Status: Pending
+---
+ hotspot/make/linux/makefiles/jsig.make   | 2 +-
+ hotspot/make/linux/makefiles/saproc.make | 2 +-
+ hotspot/make/linux/makefiles/vm.make | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git hotspot/make/linux/makefiles/jsig.make 
hotspot/make/linux/makefiles/jsig.make
+index ce29eb1..e1d6c07 100644
+--- hotspot/make/linux/makefiles/jsig.amake
 hotspot/make/linux/makefiles/jsig.make
+@@ -44,7 +44,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
+ # cause problems with interposing. See CR: 645
+ # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
+
+-LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE)
++LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) 
$(EXTRA_LDFLAGS)
+
+ # DEBUG_BINARIES overrides everything, use full -g debug information
+ ifeq ($(DEBUG_BINARIES), true)
+diff --git hotspot/make/linux/makefiles/saproc.make 
hotspot/make/linux/makefiles/saproc.make
+index 7c6e4a8..369a0ba 100644
+--- hotspot/make/linux/makefiles/saproc.make
 hotspot/make/linux/makefiles/saproc.make
+@@ -73,7 +73,7 @@ ALT_SAINCDIR=-I$(ALT_SASRCDIR) -DALT_SASRCDIR
+ else
+ ALT_SAINCDIR=
+ endif
+-SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
++SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) 
$(EXTRA_LDFLAGS)
+
+ SAARCH ?= $(BUILDARCH)
+
+diff --git hotspot/make/linux/makefiles/vm.make 
hotspot/make/linux/makefiles/vm.make
+index 1a48df9..72f8d11 100644
+--- hotspot/make/linux/makefiles/vm.make
 hotspot/make/linux/makefiles/vm.make
+@@ -122,7 +122,7 @@ CFLAGS += $(CFLAGS/NOEX)
+
+ # Extra flags from gnumake's invocation or environment
+ CFLAGS += $(EXTRA_CFLAGS)
+-LFLAGS += $(EXTRA_CFLAGS)
++LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
+
+ # Don't set excutable bit on stack segment
+ # the same could be done by separate execstack command
+--
+2.7.4
+
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH] openjdk-8-cross.inc: Fix QA error caused by missing hash

2016-08-19 Thread Erkka Kääriä
Some openjdk makefiles (e.g. vm.make) only use CFLAGS as their linker
flags. This means that the oe-specific linker flags are lost. This in
particular causes issues with the recent oe-core commit a98a81808, which
intentionally poisons the linker hash style, so that any recipes that do
not use the oe LDFLAGS fail to build.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc 
b/recipes-core/openjdk/openjdk-8-cross.inc
index 11e94ce..6097afc 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -39,21 +39,23 @@ SRC_URI_append = "\
 file://jvm.cfg \
 "
 
+# Some makefiles pick the linker flags from the CFLAGS variable, so add
+# the LDFLAGS to CFLAGS
+CFLAGS_append = " \
+  ${LDFLAGS} \
+"
+
 EXTRA_OECONF_append = "\
 --with-jobs=${@get_jdk8_native_jobs(d)} \
-\
 --with-sys-root=${STAGING_DIR} \
 --with-tools-dir=${STAGING_DIR_NATIVE} \
 --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native \
 
--with-cacerts-file=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/jre/lib/security/cacerts
 \
-\
 --disable-precompiled-headers \
 --disable-zip-debug-info \
-\
 --with-extra-cflags='${CFLAGS}' \
 --with-extra-cxxflags='${CXXFLAGS}' \
 --with-extra-ldflags='${LDFLAGS}' \
-\
 ${@jdk_configure_options(d)} \
 "
 
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH v2 2/2] openjdk-8-release-102b14.inc: Ignore deprecation

2016-08-15 Thread Erkka Kääriä
readdir_r has been deprecated since glibc 2.24. As openjdk uses this
function, a warning is generated during build that gets turned into
an error when -Werror is used.

While the readdir function is suggested as an replacement, it has
slightly different API. The warning is ignored instead to prevent any
unexpected breakage from patching the offending functions.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjdk-8-release-102b14.inc | 4 
 1 file changed, 4 insertions(+)

diff --git a/recipes-core/openjdk/openjdk-8-release-102b14.inc 
b/recipes-core/openjdk/openjdk-8-release-102b14.inc
index c9f62ff..fdeb771 100644
--- a/recipes-core/openjdk/openjdk-8-release-102b14.inc
+++ b/recipes-core/openjdk/openjdk-8-release-102b14.inc
@@ -15,6 +15,10 @@ BUILD_DIR_ECJ = "openjdk.build-ecj"
 # Force arm mode for now
 ARM_INSTRUCTION_SET_armv4t = "ARM"
 
+# readdir_r was deprecated in glibc-2.24. Ignore the error for now
+# NOTE: When updating the recipe, please check if this is still needed
+CFLAGS_append = " -Wno-error=deprecated-declarations"
+
 # Enable zero mode for arm based builds, as normal hotspot fails to build
 PACKAGECONFIG_append_arm = " zero"
 
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH v2 2/3] Openjdk-8: Fix build when using -Werror and -D_FORTIFY_SOURCE

2016-04-29 Thread Erkka Kääriä
The security flag '-D_FORTIFY_SOURCE' requires at least -O to work,
otherwise a warning is given. If CFLAGS additionally contains -Werror,
this warning turns into an error. As Openjdk build system intentionally
deoptimizes certains files due to potential bad codegen during optimization,
build will fail when both '-D_FORTIFY_SOURCE' and '-Werror' are used.
As turning the optimizations back on will likely break things, the
warning is silenced instead.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjdk-8_72b05.bb|  1 +
 recipes-core/openjdk/openjre-8_72b05.bb|  1 +
 ...openjdk8-silence-d_fortify_source-warning.patch | 54 ++
 3 files changed, 56 insertions(+)
 create mode 100644 
recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch

diff --git a/recipes-core/openjdk/openjdk-8_72b05.bb 
b/recipes-core/openjdk/openjdk-8_72b05.bb
index f378b0a..bafc6cd 100644
--- a/recipes-core/openjdk/openjdk-8_72b05.bb
+++ b/recipes-core/openjdk/openjdk-8_72b05.bb
@@ -11,6 +11,7 @@ PATCHES_URI_append = "\
 
file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no
 \
 file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \
 file://openjdk8-fix-adlc-flags.patch;apply=no \
+file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
 "
 
 do_install() {
diff --git a/recipes-core/openjdk/openjre-8_72b05.bb 
b/recipes-core/openjdk/openjre-8_72b05.bb
index 6d29d12..3a34848 100644
--- a/recipes-core/openjdk/openjre-8_72b05.bb
+++ b/recipes-core/openjdk/openjre-8_72b05.bb
@@ -9,6 +9,7 @@ PATCHES_URI_append = "\
 file://openjdk8-fix-shark-build.patch;apply=no \
 file://openjdk8-fix-shark-stdc++11.patch;apply=no \
 
file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no
 \
+file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
 "
 
 do_install() {
diff --git 
a/recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch
 
b/recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch
new file mode 100644
index 000..da94a99
--- /dev/null
+++ 
b/recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch
@@ -0,0 +1,54 @@
+makefiles: Add -Wno-cpp to CFLAGS
+
+The security flag '-D_FORTIFY_SOURCE' requires at least -O to work,
+otherwise a warning is given. If CFLAGS additionally contains -Werror,
+this warning turns into an error. As Openjdk build system intentionally
+deoptimizes certains files due to potential bad codegen during optimization,
+build will fail when both '-D_FORTIFY_SOURCE' and '-Werror' are used.
+As turning the optimizations back on will likely break things, the
+warning is silenced instead.
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+---
+ hotspot/make/linux/makefiles/amd64.make | 2 ++
+ hotspot/make/linux/makefiles/i486.make  | 2 ++
+ hotspot/make/linux/makefiles/zero.make  | 2 ++
+ 3 files changed, 6 insertions(+)
+
+diff --git hotspot/make/linux/makefiles/amd64.make 
hotspot/make/linux/makefiles/amd64.make
+index 2b77dba..db3965b 100644
+--- hotspot/make/linux/makefiles/amd64.make
 hotspot/make/linux/makefiles/amd64.make
+@@ -31,4 +31,6 @@ CFLAGS += -DVM_LITTLE_ENDIAN
+
+ CFLAGS += -D_LP64=1
+
++CFLAGS += -Wno-cpp
++
+ OPT_CFLAGS/compactingPermGenGen.o = -O1
+diff --git hotspot/make/linux/makefiles/i486.make 
hotspot/make/linux/makefiles/i486.make
+index 86e825d..6a92f09 100644
+--- hotspot/make/linux/makefiles/i486.make
 hotspot/make/linux/makefiles/i486.make
+@@ -31,4 +31,6 @@ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
+ # Must also specify if CPU is little endian
+ CFLAGS += -DVM_LITTLE_ENDIAN
+
++CFLAGS += -Wno-cpp
++
+ OPT_CFLAGS/compactingPermGenGen.o = -O1
+diff --git hotspot/make/linux/makefiles/zero.make 
hotspot/make/linux/makefiles/zero.make
+index 0270711..2b05f33 100644
+--- hotspot/make/linux/makefiles/zero.make
 hotspot/make/linux/makefiles/zero.make
+@@ -28,5 +28,7 @@
+ # Select which files to use (in top.make)
+ TYPE = ZERO
+
++CFLAGS += -Wno-cpp
++
+ # Install libjvm.so, etc in in server directory.
+ VM_SUBDIR = server
+--
+2.7.4
+
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH v2 3/3] openjre-8_72b05.bb: Add missing patches

2016-04-29 Thread Erkka Kääriä
Two patches were only applied to openjdk-8. Apply these to jre as well

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjre-8_72b05.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/recipes-core/openjdk/openjre-8_72b05.bb 
b/recipes-core/openjdk/openjre-8_72b05.bb
index 3a34848..55b2ac5 100644
--- a/recipes-core/openjdk/openjre-8_72b05.bb
+++ b/recipes-core/openjdk/openjre-8_72b05.bb
@@ -9,6 +9,8 @@ PATCHES_URI_append = "\
 file://openjdk8-fix-shark-build.patch;apply=no \
 file://openjdk8-fix-shark-stdc++11.patch;apply=no \
 
file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no
 \
+file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \
+file://openjdk8-fix-adlc-flags.patch;apply=no \
 file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
 "
 
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH v2 1/3] java-bootstrapping: Do not rely on hardcoded paths

2016-04-29 Thread Erkka Kääriä
Various paths to files are hardcoded in either helper scripts or the
resulting binaries (like path to Java class libraries). While this works
well when using the files on the build machine, things start breaking
down when the sstate gets shared between multiple workers in CI, as
the paths between workers can differ.

Instead of using these hardcoded paths, form the paths at runtime and pass them 
as parameters when required.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 ...cacao-1.6.1-do-not-rely-on-absolute-paths.patch | 41 ++
 recipes-core/cacao/cacao-initial-native_0.98.bb|  1 +
 recipes-core/cacao/cacao_1.6.1.bb  | 21 ---
 ...cacao-0.9.8-do-not-rely-on-absolute-paths.patch | 33 +
 recipes-core/ecj/ecj-bootstrap-native.bb   |  8 -
 recipes-core/ecj/ecj-initial-native.bb |  9 -
 6 files changed, 96 insertions(+), 17 deletions(-)
 create mode 100644 
recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
 create mode 100644 
recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch

diff --git 
a/recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
 
b/recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
new file mode 100644
index 000..2b046cf
--- /dev/null
+++ 
b/recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
@@ -0,0 +1,41 @@
+java.in: Do not use hardcode paths
+
+Cacao uses hardcoded paths to various files, if these paths are not
+provided. This causes issues when sharing sstate with otherwise
+identical workers, if build time paths are not identical.
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+
+Upstream-Status: Inappropriate [Yocto-specific fixes]
+
+---
+ cacao-1.6.1/src/scripts/java.in | 16 ++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git cacao-1.6.1/src/scripts/java.in cacao-1.6.1/src/scripts/java.in
+index 0790f02..2118de7 100644
+--- cacao-1.6.1/src/scripts/java.in
 cacao-1.6.1/src/scripts/java.in
+@@ -22,5 +22,17 @@
+ ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ ## 02110-1301, USA.
+
+-IFS=""
+-exec $(dirname ${0})/cacao ${1+"$@"}
++SH_DIR=`dirname "$0"`
++CURRENT_DIR=`cd "${SH_DIR}" && pwd`
++
++# if this shell script is invoked through symlink, we get invalid paths. As 
getting the real path to this file is
++# very painful using only /bin/sh, python is used instead.
++PYTHON_STR="import os; print 
os.path.dirname(os.path.realpath(os.readlink(\"${CURRENT_DIR}/java\"))) if 
os.path.islink(\"${CURRENT_DIR}/java\") else \"${CURRENT_DIR}\""
++REAL_DIR=`python -c "${PYTHON_STR}"`
++
++PARENT_DIR=`dirname ${REAL_DIR}`
++
++export 
BOOTCLASSPATH="${PARENT_DIR}/share/cacao/vm.zip:${PARENT_DIR}/share/classpath/glibj.zip"
++LIBRARY_PATH="-Djava.library.path=${PARENT_DIR}/lib/classpath"
++exec ${REAL_DIR}/cacao ${LIBRARY_PATH} ${1+"$@"}
++
+--
+2.7.4
+
diff --git a/recipes-core/cacao/cacao-initial-native_0.98.bb 
b/recipes-core/cacao/cacao-initial-native_0.98.bb
index 2a8ced5..caaf53c 100644
--- a/recipes-core/cacao/cacao-initial-native_0.98.bb
+++ b/recipes-core/cacao/cacao-initial-native_0.98.bb
@@ -15,6 +15,7 @@ SRC_URI = "\
 file://cacao-0.98-initial.patch \
 file://disable_hw_exceptions.patch \
 file://cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch \
+file://cacao-0.9.8-do-not-rely-on-absolute-paths.patch \
 "
 
 # libjvm disabled - it would conflict with cacao-native installations
diff --git a/recipes-core/cacao/cacao_1.6.1.bb 
b/recipes-core/cacao/cacao_1.6.1.bb
index 83f216c..ec13cc5 100644
--- a/recipes-core/cacao/cacao_1.6.1.bb
+++ b/recipes-core/cacao/cacao_1.6.1.bb
@@ -11,7 +11,10 @@ DEPENDS = "zlib libtool classpath virtual/javac-native bdwgc"
 RPROVIDES_${PN} = "java2-runtime"
 
 SRC_URI = 
"http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.xz
 \
-   file://system-boehm-gc.patch"
+   file://system-boehm-gc.patch \
+   file://cacao-1.6.1-do-not-rely-on-absolute-paths.patch \
+"
+
 SRC_URI[md5sum] = "2c18478404afd1cffdd15ad1e9d85a57"
 SRC_URI[sha256sum] = 
"eecc8bd1b528a028f43d9d1d0c06b97855bbf1d40e03826d911ebbc0b6971e12"
 
@@ -23,13 +26,12 @@ REQUIRED_DISTRO_FEATURES_class-native := ""
 EXTRA_OECONF_class-native = "\
 --enable-debug \
 --with-vm-zip=${datadir}/cacao/vm.zip \
---disable-libjvm \
-\
 --with-java-runtime-library-classes=${datadir}/classpath/glibj.zip \
 --with-java-runtime-library-libdir=${libdir_jni}:${libdir} \
 --with-jni_md_h=${includedir}/classpath \
 --with-jni_h=${includedir}/classpath \
 --disable-test

[oe] [meta-intel-iot-middleware][PATCH] mosquitto_1.4.bb: Fix typo in variable name

2016-04-27 Thread Erkka Kääriä
libbir -> libdir

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-connectivity/mosquitto/mosquitto_1.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-connectivity/mosquitto/mosquitto_1.4.bb 
b/recipes-connectivity/mosquitto/mosquitto_1.4.bb
index 789c59a..e91a34d 100644
--- a/recipes-connectivity/mosquitto/mosquitto_1.4.bb
+++ b/recipes-connectivity/mosquitto/mosquitto_1.4.bb
@@ -23,7 +23,7 @@ do_compile() {
 
 do_install() {
 oe_runmake install DESTDIR=${D}
-install -d ${D}${libbir}
+install -d ${D}${libdir}
 install -m 0644 lib/libmosquitto.a ${D}${libdir}/
 
 install -d ${D}${systemd_unitdir}/system/
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH 3/3] openjre-8_72b05.bb: Add missing patches

2016-04-22 Thread Erkka Kääriä
Two patches were only applied to openjdk-8. Apply these to jre as well

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjre-8_72b05.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/recipes-core/openjdk/openjre-8_72b05.bb 
b/recipes-core/openjdk/openjre-8_72b05.bb
index c7de5c7..d65b205 100644
--- a/recipes-core/openjdk/openjre-8_72b05.bb
+++ b/recipes-core/openjdk/openjre-8_72b05.bb
@@ -9,6 +9,8 @@ PATCHES_URI_append = "\
 file://openjdk8-fix-shark-build.patch;apply=no \
 file://openjdk8-fix-shark-stdc++11.patch;apply=no \
 
file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no
 \
+file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \
+file://openjdk8-fix-adlc-flags.patch;apply=no \
 file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
 "
 
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH 1/3] java-bootstrapping: Do not rely on hardcoded paths

2016-04-22 Thread Erkka Kääriä
Various paths to files are hardcoded in either helper scripts or the
resulting binaries (like path to Java class libraries). While this works
well when using the files on the build machine, things start breaking
down when the sstate gets shared between multiple workers in CI, as
the paths between workers can differ.

Instead of using these hardcoded paths, form the paths at runtime and pass them 
as parameters when required.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 ...cacao-1.6.1-do-not-rely-on-absolute-paths.patch | 38 ++
 recipes-core/cacao/cacao-initial-native_0.98.bb|  1 +
 recipes-core/cacao/cacao_1.6.1.bb  | 22 +++--
 ...cacao-0.9.8-do-not-rely-on-absolute-paths.patch | 31 ++
 recipes-core/ecj/ecj-bootstrap-native.bb   |  8 -
 recipes-core/ecj/ecj-initial-native.bb |  9 -
 6 files changed, 90 insertions(+), 19 deletions(-)
 create mode 100644 
recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
 create mode 100644 
recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch

diff --git 
a/recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
 
b/recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
new file mode 100644
index 000..11d6bca
--- /dev/null
+++ 
b/recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
@@ -0,0 +1,38 @@
+java.in: Do not use hardcode paths
+
+Cacao uses hardcoded paths to various files, if these paths are not
+provided. This causes issues when sharing sstate with otherwise
+identical workers, if build time paths are not identical.
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+---
+ cacao-1.6.1/src/scripts/java.in | 16 ++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git cacao-1.6.1/src/scripts/java.in cacao-1.6.1/src/scripts/java.in
+index 0790f02..2118de7 100644
+--- cacao-1.6.1/src/scripts/java.in
 cacao-1.6.1/src/scripts/java.in
+@@ -22,5 +22,17 @@
+ ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ ## 02110-1301, USA.
+
+-IFS=""
+-exec $(dirname ${0})/cacao ${1+"$@"}
++SH_DIR=`dirname "$0"`
++CURRENT_DIR=`cd "${SH_DIR}" && pwd`
++
++# if this shell script is invoked through symlink, we get invalid paths. As 
getting the real path to this file is
++# very painful using only /bin/sh, python is used instead.
++PYTHON_STR="import os; print 
os.path.dirname(os.path.realpath(os.readlink(\"${CURRENT_DIR}/java\"))) if 
os.path.islink(\"${CURRENT_DIR}/java\") else \"${CURRENT_DIR}\""
++REAL_DIR=`python -c "${PYTHON_STR}"`
++
++PARENT_DIR=`dirname ${REAL_DIR}`
++
++export 
BOOTCLASSPATH="${PARENT_DIR}/share/cacao/vm.zip:${PARENT_DIR}/share/classpath/glibj.zip"
++LIBRARY_PATH="-Djava.library.path=${PARENT_DIR}/lib/classpath"
++exec ${REAL_DIR}/cacao ${LIBRARY_PATH} ${1+"$@"}
++
+--
+2.7.4
+
diff --git a/recipes-core/cacao/cacao-initial-native_0.98.bb 
b/recipes-core/cacao/cacao-initial-native_0.98.bb
index 2a8ced5..caaf53c 100644
--- a/recipes-core/cacao/cacao-initial-native_0.98.bb
+++ b/recipes-core/cacao/cacao-initial-native_0.98.bb
@@ -15,6 +15,7 @@ SRC_URI = "\
 file://cacao-0.98-initial.patch \
 file://disable_hw_exceptions.patch \
 file://cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch \
+file://cacao-0.9.8-do-not-rely-on-absolute-paths.patch \
 "
 
 # libjvm disabled - it would conflict with cacao-native installations
diff --git a/recipes-core/cacao/cacao_1.6.1.bb 
b/recipes-core/cacao/cacao_1.6.1.bb
index 83f216c..d805523 100644
--- a/recipes-core/cacao/cacao_1.6.1.bb
+++ b/recipes-core/cacao/cacao_1.6.1.bb
@@ -11,7 +11,10 @@ DEPENDS = "zlib libtool classpath virtual/javac-native bdwgc"
 RPROVIDES_${PN} = "java2-runtime"
 
 SRC_URI = 
"http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.xz
 \
-   file://system-boehm-gc.patch"
+   file://system-boehm-gc.patch \
+   file://cacao-1.6.1-do-not-rely-on-absolute-paths.patch \
+"
+
 SRC_URI[md5sum] = "2c18478404afd1cffdd15ad1e9d85a57"
 SRC_URI[sha256sum] = 
"eecc8bd1b528a028f43d9d1d0c06b97855bbf1d40e03826d911ebbc0b6971e12"
 
@@ -23,13 +26,12 @@ REQUIRED_DISTRO_FEATURES_class-native := ""
 EXTRA_OECONF_class-native = "\
 --enable-debug \
 --with-vm-zip=${datadir}/cacao/vm.zip \
---disable-libjvm \
-\
 --with-java-runtime-library-classes=${datadir}/classpath/glibj.zip \
 --with-java-runtime-library-libdir=${libdir_jni}:${libdir} \
 --with-jni_md_h=${includedir}/classpath \
 --with-jni_h=${includedir}/classpath \
 --disable-test-dependency-checks \
+--disable-libjvm  \
 "
 
 CACHED_CONFIGUREV

[oe] [meta-java][PATCH 2/3] Openjdk-8: Add -Wno-cpp to CFLAGS in certain makefiles

2016-04-22 Thread Erkka Kääriä
The security flag '-D_FORTIFY_SOURCE' requires at least -O to work,
otherwise a warning is given. If CFLAGS additionally contains -Werror,
this warning turns into an error. As Openjdk build system intentionally
deoptimizes certains files due to potential bad codegen during optimization,
build will fail when both '-D_FORTIFY_SOURCE' and '-Werror' are used.
As turning the optimizations back on will likely break things, the
warning is silenced instead.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjdk-8_72b05.bb|  1 +
 recipes-core/openjdk/openjre-8_72b05.bb|  1 +
 ...openjdk8-silence-d_fortify_source-warning.patch | 54 ++
 3 files changed, 56 insertions(+)
 create mode 100644 
recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch

diff --git a/recipes-core/openjdk/openjdk-8_72b05.bb 
b/recipes-core/openjdk/openjdk-8_72b05.bb
index feaf227..ebee782 100644
--- a/recipes-core/openjdk/openjdk-8_72b05.bb
+++ b/recipes-core/openjdk/openjdk-8_72b05.bb
@@ -11,6 +11,7 @@ PATCHES_URI_append = "\
 
file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no
 \
 file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \
 file://openjdk8-fix-adlc-flags.patch;apply=no \
+file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
 "
 
 do_compile_append() {
diff --git a/recipes-core/openjdk/openjre-8_72b05.bb 
b/recipes-core/openjdk/openjre-8_72b05.bb
index 6202498..c7de5c7 100644
--- a/recipes-core/openjdk/openjre-8_72b05.bb
+++ b/recipes-core/openjdk/openjre-8_72b05.bb
@@ -9,6 +9,7 @@ PATCHES_URI_append = "\
 file://openjdk8-fix-shark-build.patch;apply=no \
 file://openjdk8-fix-shark-stdc++11.patch;apply=no \
 
file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no
 \
+file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
 "
 
 do_compile_append() {
diff --git 
a/recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch
 
b/recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch
new file mode 100644
index 000..da94a99
--- /dev/null
+++ 
b/recipes-core/openjdk/patches-openjdk-8/openjdk8-silence-d_fortify_source-warning.patch
@@ -0,0 +1,54 @@
+makefiles: Add -Wno-cpp to CFLAGS
+
+The security flag '-D_FORTIFY_SOURCE' requires at least -O to work,
+otherwise a warning is given. If CFLAGS additionally contains -Werror,
+this warning turns into an error. As Openjdk build system intentionally
+deoptimizes certains files due to potential bad codegen during optimization,
+build will fail when both '-D_FORTIFY_SOURCE' and '-Werror' are used.
+As turning the optimizations back on will likely break things, the
+warning is silenced instead.
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+---
+ hotspot/make/linux/makefiles/amd64.make | 2 ++
+ hotspot/make/linux/makefiles/i486.make  | 2 ++
+ hotspot/make/linux/makefiles/zero.make  | 2 ++
+ 3 files changed, 6 insertions(+)
+
+diff --git hotspot/make/linux/makefiles/amd64.make 
hotspot/make/linux/makefiles/amd64.make
+index 2b77dba..db3965b 100644
+--- hotspot/make/linux/makefiles/amd64.make
 hotspot/make/linux/makefiles/amd64.make
+@@ -31,4 +31,6 @@ CFLAGS += -DVM_LITTLE_ENDIAN
+
+ CFLAGS += -D_LP64=1
+
++CFLAGS += -Wno-cpp
++
+ OPT_CFLAGS/compactingPermGenGen.o = -O1
+diff --git hotspot/make/linux/makefiles/i486.make 
hotspot/make/linux/makefiles/i486.make
+index 86e825d..6a92f09 100644
+--- hotspot/make/linux/makefiles/i486.make
 hotspot/make/linux/makefiles/i486.make
+@@ -31,4 +31,6 @@ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
+ # Must also specify if CPU is little endian
+ CFLAGS += -DVM_LITTLE_ENDIAN
+
++CFLAGS += -Wno-cpp
++
+ OPT_CFLAGS/compactingPermGenGen.o = -O1
+diff --git hotspot/make/linux/makefiles/zero.make 
hotspot/make/linux/makefiles/zero.make
+index 0270711..2b05f33 100644
+--- hotspot/make/linux/makefiles/zero.make
 hotspot/make/linux/makefiles/zero.make
+@@ -28,5 +28,7 @@
+ # Select which files to use (in top.make)
+ TYPE = ZERO
+
++CFLAGS += -Wno-cpp
++
+ # Install libjvm.so, etc in in server directory.
+ VM_SUBDIR = server
+--
+2.7.4
+
-- 
2.7.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH 1/2] Openjdk-8: Fix openjdk build when CXX contains assembler arguments

2016-03-21 Thread Erkka Kääriä
Builds currently fail, if CXX also contains assembler arguments. These
arguments are in form "-Wa,args,are,here". When this string is then used in
openjdk make process, it is inserted before the make evaluates its argument
lists. As these lists are comma separated, the commas in assembler argument list
are interpreted as list separators, which breaks the build.

This is fixed by adding the extra '$', which means the string is inserted after
make evaluates the list.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjdk-8_72b05.bb  |  1 +
 ...dk8-fix-assembler-flag-handling-in-makefile.patch | 20 
 2 files changed, 21 insertions(+)
 create mode 100644 
recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-assembler-flag-handling-in-makefile.patch

diff --git a/recipes-core/openjdk/openjdk-8_72b05.bb 
b/recipes-core/openjdk/openjdk-8_72b05.bb
index e0a786a..1a01630 100644
--- a/recipes-core/openjdk/openjdk-8_72b05.bb
+++ b/recipes-core/openjdk/openjdk-8_72b05.bb
@@ -9,6 +9,7 @@ PATCHES_URI_append = "\
 file://openjdk8-fix-shark-build.patch;apply=no \
 file://openjdk8-fix-shark-stdc++11.patch;apply=no \
 
file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no
 \
+file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \
 "
 
 do_compile_append() {
diff --git 
a/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-assembler-flag-handling-in-makefile.patch
 
b/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-assembler-flag-handling-in-makefile.patch
new file mode 100644
index 000..5e02f28
--- /dev/null
+++ 
b/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-assembler-flag-handling-in-makefile.patch
@@ -0,0 +1,20 @@
+Delay $CXX insertion until after make has evaluated the comma-separated list,
+as any comma separated parameters in CXX (such as assembler arguments) would
+break the build
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+
+Upstream-Status: Pending
+
+---
+--- make/common/NativeCompilation.gmk
 make/common/NativeCompilation.gmk
+@@ -372,7 +372,7 @@ define SetupNativeCompilation
+   $$(foreach p,$$($1_SRCS), \
+   $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
+   $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
+-  $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS
++  $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$$(CXX),$$($1_ASFLAGS
+
+   # On windows we need to create a resource file
+   ifeq ($(OPENJDK_TARGET_OS), windows)
-- 
2.7.3

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [PATCH] ecj.in: Expand retry logic to work around internal compiler errors

2016-01-29 Thread Erkka Kääriä
Ecj rarely crashes due to internal compiler error. Extend the existing retry
logic to silently retry if compile fails.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/ecj/files/ecj.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/recipes-core/ecj/files/ecj.in b/recipes-core/ecj/files/ecj.in
index caebed3..36fb9ae 100755
--- a/recipes-core/ecj/files/ecj.in
+++ b/recipes-core/ecj/files/ecj.in
@@ -9,6 +9,10 @@ while [ ${error_counter} -le ${error_max} -a ${error_occured} 
= true ]; do
 echo "ecj crashed ${error_counter} - silently trying again"
 error_occured=true
 error_counter=$(( $error_counter + 1 ))
+elif [ ${error_number} -eq 255 ]; then
+echo "ecj returned -1 - likely internal compiler error or similar - 
silently trying again"
+error_occured=true
+error_counter=$(( $error_counter + 1 ))
 else
 error_occured=false
 fi
-- 
2.1.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH] openjdk-8: Use zero mode on arm

2015-12-16 Thread Erkka Kääriä
Currently arm build fails due to hotspot errors. Use zero mode instead.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/openjdk/openjdk-8-release-72b05.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-core/openjdk/openjdk-8-release-72b05.inc 
b/recipes-core/openjdk/openjdk-8-release-72b05.inc
index 4f9580e..f8ba367 100644
--- a/recipes-core/openjdk/openjdk-8-release-72b05.inc
+++ b/recipes-core/openjdk/openjdk-8-release-72b05.inc
@@ -15,6 +15,9 @@ BUILD_DIR_ECJ = "openjdk.build-ecj"
 # Force arm mode for now
 ARM_INSTRUCTION_SET_armv4t = "ARM"
 
+# Enable zero mode for arm based builds, as normal hotspot fails to build 
+PACKAGECONFIG_append_arm = " zero"
+
 CORBA_CHANGESET = "7deeb4f70404"
 SRC_URI[corba.md5sum] = "544b4963d14fb7155b12dbc56d058649"
 SRC_URI[corba.sha256sum] = 
"a75c31706f634585baf0d0a0b20e321ac634d41d6afb62bd6ffb1f9c0b766d09"
-- 
2.1.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH] gnumail: Fix race condition in makefile

2015-12-10 Thread Erkka Kääriä
Parallel make does not handle multiple javac invocations correctly, as javac
compiles any uncompiled dependencies on its own. This leads to a race condition
where make may see incomplete class files and incorrectly assume that the
class files has already been compiled. This ultimately causes incomplete class
files to be included in one of the jars, causing build failures later one when
javac attempts to use such class file.

This issue is fixed by patching the makefile so that only one instance of javac
is invoked, which compiles all the java files in one go.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 .../fix_makefile_race_condition.patch  | 129 +
 recipes-core/classpathx/gnumail_1.1.2.bb   |   1 +
 2 files changed, 130 insertions(+)
 create mode 100644 
recipes-core/classpathx/gnumail-1.1.2/fix_makefile_race_condition.patch

diff --git 
a/recipes-core/classpathx/gnumail-1.1.2/fix_makefile_race_condition.patch 
b/recipes-core/classpathx/gnumail-1.1.2/fix_makefile_race_condition.patch
new file mode 100644
index 000..40f3e5a
--- /dev/null
+++ b/recipes-core/classpathx/gnumail-1.1.2/fix_makefile_race_condition.patch
@@ -0,0 +1,129 @@
+From b47573456292e90988b661fe3d81c900462d7687 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Erkka=20K=C3=A4=C3=A4ri=C3=A4?= <erkka.kaa...@intel.com>
+Date: Thu, 10 Dec 2015 08:58:21 +0200
+Subject: [PATCH] gnumail: Fix race condition in makefile
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Parallel make does not handle multiple javac invocations correctly, as javac
+compiles any uncompiled dependencies on its own. This leads to a race condition
+where make may see incomplete class files and incorrectly assume that the class
+file has already been compiled. This ultimately causes incomplete class files
+to be included in one of the jars, causing build failures later on when javac
+attempts to use such class file.
+
+This issue is fixed by patching the makefile in such way that only one instance
+of javac is invoked, which compiles all the java files in one go.
+
+Upstream-Status: Inappropriate [dead project]
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+---
+ Makefile.am | 70 +
+ 1 file changed, 10 insertions(+), 60 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8116b55..5c78dbc 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -295,18 +295,6 @@ classpath = 
$(src):$(activation_jar):$(inetlib_jar):$(jsse_jar)
+ # Targets
+ BUILT_SOURCES = $(gnumail_jar) $(providers_jar)
+ 
+-#�EXTRA_DIST = jarcompiler $(API_JAVASRC) $(GNU_SRC) $(MAIL_META)
+-
+-gnumail_classes = $(patsubst $(src)/%.java, $(dst)/%.class, 
$(gnumail_sources))
+-util_classes = $(patsubst $(src)/%.java, $(dst)/%.class, $(util_sources))
+-provider_classes = $(patsubst $(src)/%.java, $(dst)/%.class, 
$(provider_sources))
+-smtp_classes = $(patsubst $(src)/%.java, $(dst)/%.class, $(smtp_sources))
+-imap_classes = $(patsubst $(src)/%.java, $(dst)/%.class, $(imap_sources))
+-pop3_classes = $(patsubst $(src)/%.java, $(dst)/%.class, $(pop3_sources))
+-nntp_classes = $(patsubst $(src)/%.java, $(dst)/%.class, $(nntp_sources))
+-mbox_classes = $(patsubst $(src)/%.java, $(dst)/%.class, $(mbox_sources))
+-maildir_classes = $(patsubst $(src)/%.java, $(dst)/%.class, 
$(maildir_sources))
+-
+ META-INF:
+   mkdir -p META-INF
+ 
+@@ -361,16 +349,14 @@ $(dst):
+ 
+ # Jars
+ 
+-$(gnumail_jar): $(dst) $(gnumail_meta) $(gnumail_classes) $(util_classes)
++$(gnumail_jar): $(dst) $(gnumail_meta) build_sources
+   $(JAR) cfm $(gnumail_jar) $(manifest_mf) \
+   $(gnumail_meta) \
+   -C $(dst) javax \
+   -C $(dst) gnu/mail/handler \
+   -C $(dst) gnu/mail/util 
+ 
+-$(providers_jar): $(dst) $(providers_meta) $(provider_classes) 
$(smtp_classes) \
+-  $(imap_classes) $(pop3_classes) $(nntp_classes) $(mbox_classes) \
+-  $(maildir_classes)
++$(providers_jar): $(dst) $(providers_meta) build_sources
+   $(JAR) cfm $(providers_jar) $(manifest_mf) \
+   $(providers_meta) \
+   -C $(dst) gnu/mail/providers \
+@@ -378,50 +364,14 @@ $(providers_jar): $(dst) $(providers_meta) 
$(provider_classes) $(smtp_classes) \
+ 
+ # Compilation
+ 
+-#gnumail: util $(gnumail_classes)
+-
+-$(gnumail_classes): $(dst)/%.class: $(src)/%.java
+-  $(JAVAC) $(JAVACFLAGS) -classpath $(classpath) -d $(dst) $<
+-
+-#util: $(util_classes)
+-
+-$(util_classes): $(dst)/%.class: $(src)/%.java
+-  $(JAVAC) $(JAVACFLAGS) -classpath $(classpath) -d $(dst) $<
+-
+-#provider_util: $(gnumail_jar) $(provider_classes)
+-
+-$(provider_classes): $(dst)/%.class: $(src)/%.java
+-  $(JAVAC) $(JAVACFLAGS) -classpath $(classpath) -d $(dst) $<
+-
+-#smtp: provider_util $(smtp_classes)
+-
+-$(smtp_classes): $(dst)/%.class: $(src)/%.java
+-  $(JAVAC) $(JAVACFLAGS) -clas

[oe] [meta-java][PATCH] ecj-initial.in: Disable multithreading to mitigate segfaulting

2015-11-09 Thread Erkka Kääriä
Cacao-initial-native suffers from sporadic segmentation faults, when the Java
program uses multiple Java threads, due to a race condition. In particular,
jamvm-native and classpath-native builds would occasionally fail as the
eclipse compiler used during build task by default uses multiple threads.

As fixing the race condition would require large changes to the
cacao-initial-native codebase, and as it is only used briefly during the
bootstrapping process, it is easier and safer to just force ecj-initial to run
in a singlethreaded mode.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/ecj/files/ecj-initial.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/recipes-core/ecj/files/ecj-initial.in 
b/recipes-core/ecj/files/ecj-initial.in
index 201..30c1c8a 100755
--- a/recipes-core/ecj/files/ecj-initial.in
+++ b/recipes-core/ecj/files/ecj-initial.in
@@ -1 +1,3 @@
-${RUNTIME} -Xmx512m -cp ${ECJ_JAR} 
org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"}
+# -Djdt.compiler.useSingleThread=true forces the compiler to only use a single 
thread. This is a workaround to a race condition
+# bug in cacao-initial-native, where using multiple java thread could cause 
sporadic segmentation faults
+${RUNTIME} -Xmx512m -Djdt.compiler.useSingleThread=true -cp ${ECJ_JAR} 
org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"}
-- 
2.1.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH] icedtea7-native: Fix memory leak when compiled with GCC 5.0+

2015-10-23 Thread Erkka Kääriä
Upstream-Status: Backport

Hotspot compiler has a bug where signed integers could overflow. This is
undefined behaviour, and causes massive memory leak when compiled with GCC 5.0+,
causing the build to fail.

This is fixed by backporting patch from
https://bugs.openjdk.java.net/browse/JDK-8078666 where it was fixed by
Severin Gehwolf.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 .../icedtea-hotspot-fix-undefined-behaviour.patch  | 49 ++
 recipes-core/icedtea/openjdk-7-release-03b147.inc  |  2 +
 2 files changed, 51 insertions(+)
 create mode 100644 
recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-fix-undefined-behaviour.patch

diff --git 
a/recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-fix-undefined-behaviour.patch
 
b/recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-fix-undefined-behaviour.patch
new file mode 100644
index 000..56513a0
--- /dev/null
+++ 
b/recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-fix-undefined-behaviour.patch
@@ -0,0 +1,49 @@
+Upstream-Status: Backport
+
+Hotspot compiler has a bug where signed integers could overflow. This is 
+undefined behaviour, and causes massive memory leak when compiled with GCC 
5.0+, 
+causing the build to fail.
+
+This is fixed by backporting patch from 
+https://bugs.openjdk.java.net/browse/JDK-8078666 where it was fixed by 
+Severin Gehwolf.
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+
+--- openjdk/hotspot/src/share/vm/opto/type.cpp
 openjdk/hotspot/src/share/vm/opto/type.cpp
+@@ -1077,11 +1077,11 @@ static int normalize_int_widen( jint lo, jint hi, int 
w ) {
+   // Certain normalizations keep us sane when comparing types.
+   // The 'SMALLINT' covers constants and also CC and its relatives.
+   if (lo <= hi) {
+-if ((juint)(hi - lo) <= SMALLINT)  w = Type::WidenMin;
+-if ((juint)(hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT
++if (((juint)hi - lo) <= SMALLINT)  w = Type::WidenMin;
++if (((juint)hi - lo) >= max_juint) w = Type::WidenMax; // TypeInt::INT
+   } else {
+-if ((juint)(lo - hi) <= SMALLINT)  w = Type::WidenMin;
+-if ((juint)(lo - hi) >= max_juint) w = Type::WidenMin; // dual 
TypeInt::INT
++if (((juint)lo - hi) <= SMALLINT)  w = Type::WidenMin;
++if (((juint)lo - hi) >= max_juint) w = Type::WidenMin; // dual 
TypeInt::INT  
+   }
+   return w;
+ }
+@@ -1332,11 +1332,11 @@ static int normalize_long_widen( jlong lo, jlong hi, 
int w ) {
+   // Certain normalizations keep us sane when comparing types.
+   // The 'SMALLINT' covers constants.
+   if (lo <= hi) {
+-if ((julong)(hi - lo) <= SMALLINT)   w = Type::WidenMin;
+-if ((julong)(hi - lo) >= max_julong) w = Type::WidenMax; // TypeLong::LONG
++if (((julong)hi - lo) <= SMALLINT)   w = Type::WidenMin;
++if (((julong)hi - lo) >= max_julong) w = Type::WidenMax; // 
TypeLong::LONG  
+   } else {
+-if ((julong)(lo - hi) <= SMALLINT)   w = Type::WidenMin;
+-if ((julong)(lo - hi) >= max_julong) w = Type::WidenMin; // dual 
TypeLong::LONG
++if (((julong)lo - hi) <= SMALLINT)   w = Type::WidenMin;
++if (((julong)lo - hi) >= max_julong) w = Type::WidenMin; // dual 
TypeLong::LONG
+   }
+   return w;
+ }
+-- 
+2.1.4
+
diff --git a/recipes-core/icedtea/openjdk-7-release-03b147.inc 
b/recipes-core/icedtea/openjdk-7-release-03b147.inc
index 98266f7..b1cf6e9 100644
--- a/recipes-core/icedtea/openjdk-7-release-03b147.inc
+++ b/recipes-core/icedtea/openjdk-7-release-03b147.inc
@@ -84,6 +84,7 @@ OPENJDK_PATCHES = " \
file://icedtea-change-to-gdb-debug-format.patch;apply=no \
file://icedtea-disable-x11-in-headless.patch;apply=no \
file://icedtea-disable-sun.applet-for-tools-in-headless.patch;apply=no \
+   file://icedtea-hotspot-fix-undefined-behaviour.patch;apply=no \
 "
 
 OPENJDK_HEADLESS_PATCHES = " \
@@ -102,5 +103,6 @@ export DISTRIBUTION_PATCHES = " \
patches/icedtea-flags.patch \
patches/icedtea-openjdk-remove-currency-data-generation-expi.patch \
patches/icedtea-change-to-gdb-debug-format.patch \
+   patches/icedtea-hotspot-fix-undefined-behaviour.patch \
${CLEAN_X11_DISTRIBUTION_PATCH} \
 "
-- 
2.1.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH] cacao-initial-native: Fix undefined behaviour in gc

2015-10-21 Thread Erkka Kääriä
Upstream-Status: Backport

Fixes undefined behaviour in boehm GC used by cacao-initial-native
as suggested at
https://github.com/ivmai/bdwgc/commit/16780405c899f01119bc45167122b4242f6b34fb.

The undefined behaviour at very least causes a segmentation fault during
classpath-native configure step with Fedora 22.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/cacao/cacao-initial-native_0.98.bb|  1 +
 ...-0.9.8-initial-fix-gc-undefined-behaviour.patch | 35 ++
 2 files changed, 36 insertions(+)
 create mode 100644 
recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch

diff --git a/recipes-core/cacao/cacao-initial-native_0.98.bb 
b/recipes-core/cacao/cacao-initial-native_0.98.bb
index ec7fbdb..2a8ced5 100644
--- a/recipes-core/cacao/cacao-initial-native_0.98.bb
+++ b/recipes-core/cacao/cacao-initial-native_0.98.bb
@@ -14,6 +14,7 @@ SRC_URI = "\
 
http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2;
 \
 file://cacao-0.98-initial.patch \
 file://disable_hw_exceptions.patch \
+file://cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch \
 "
 
 # libjvm disabled - it would conflict with cacao-native installations
diff --git 
a/recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch 
b/recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch
new file mode 100644
index 000..ccc35cb
--- /dev/null
+++ 
b/recipes-core/cacao/files/cacao-0.9.8-initial-fix-gc-undefined-behaviour.patch
@@ -0,0 +1,35 @@
+Upstream-Status: Backport
+
+This fixes undefined behaviour in boehm GC as suggested at
+https://github.com/ivmai/bdwgc/commit/16780405c899f01119bc45167122b4242f6b34fb.
+
+The undefined behaviour at very least causes a segmentation fault during
+classpath-native configure step.
+
+Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
+
+--- cacao-0.98/src/mm/boehm-gc/mark_rts.c
 cacao-0.98/src/mm/boehm-gc/mark_rts.c
+@@ -371,18 +371,7 @@ ptr_t p;
+ 
+ ptr_t GC_approx_sp()
+ {
+-VOLATILE word dummy;
+-
+-dummy = 42;   /* Force stack to grow if necessary.Otherwise the   
*/
+-  /* later accesses might cause the kernel to think we're */
+-  /* doing something wrong.   */
+-#   ifdef _MSC_VER
+-# pragma warning(disable:4172)
+-#   endif
+-return((ptr_t)());
+-#   ifdef _MSC_VER
+-# pragma warning(default:4172)
+-#   endif
++return __builtin_frame_address(0);
+ }
+ 
+ /*
+-- 
+2.1.4
+
-- 
2.1.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-java][PATCH] cacao-initial-native: Fix sed matching

2015-10-15 Thread Erkka Kääriä
The recipe uses sed to patch src/scripts/java.in so that it execs cacao-initial
instead of cacao. However, if configure step is run again, -initial is appended
again to the string, leading to 'exec cacao-initial-initial'. This causes the
build to fail.

This is fixed by changing the sed command to consider larger portion of the
source string. This ensures that the -initial is only appended once.

Signed-off-by: Erkka Kääriä <erkka.kaa...@intel.com>
---
 recipes-core/cacao/cacao-initial-native_0.98.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-core/cacao/cacao-initial-native_0.98.bb 
b/recipes-core/cacao/cacao-initial-native_0.98.bb
index 72c6246..ec7fbdb 100644
--- a/recipes-core/cacao/cacao-initial-native_0.98.bb
+++ b/recipes-core/cacao/cacao-initial-native_0.98.bb
@@ -35,7 +35,7 @@ export JAR="fastjar"
 
 do_configure_append() {
   # Fix the executable name in the wrapper script.
-  sed -i -e "s|exec cacao|exec cacao-initial|" src/scripts/java.in
+  sed -i -e "s|exec cacao \\$|exec cacao-initial \\$|" src/scripts/java.in
 }
 
 SRC_URI[md5sum] = "8b8907c8b925761c9410bcadb9705346"
-- 
2.1.4

-
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel