llvm: update 3.5.2 to have a sane ARM JIT for OpenJDK-8
PATCH 1/1 llvm: update 3.5.2 to have a sane ARM JIT for OpenJDK-8
llvm introduced new JIT technology MCJIT with llvm 3.4 and fixes ARM in 3.5 (see http://llvm.org/releases/3.5.2/docs/ReleaseNotes.html#changes-to-the-arm-backend).
Ensure JIT is built with llvm
--- meta-oe/recipes-core/llvm/llvm.inc | 9 +++----- meta-oe/recipes-core/llvm/llvm3.3_3.3.bb | 7 ++++++ .../llvm/llvm3.5/arm_fenv_uclibc.patch | 14 ++++++++++++ meta-oe/recipes-core/llvm/llvm3.5_3.5.2.bb | 25 ++++++++++++++++++++++ 4 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 meta-oe/recipes-core/llvm/llvm3.5/arm_fenv_uclibc.patch create mode 100644 meta-oe/recipes-core/llvm/llvm3.5_3.5.2.bb
meta-oe/recipes-core/llvm/llvm.inc +3 -6
@@ -20,19 +20,15 @@ DESCRIPTION = "The Low Level Virtual Machine" HOMEPAGE = "http://llvm.org" -# 3-clause BSD-like -# University of Illinois/NCSA Open Source License -LICENSE = "NCSA" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8" - DEPENDS = "libffi libxml2-native llvm-common" inherit perlnative pythonnative autotools LLVM_RELEASE = "${PV}" LLVM_DIR = "llvm${LLVM_RELEASE}" +LLVM_SRC_EXT ?= "xz" -SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.gz" +SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.${LLVM_SRC_EXT}" S = "${WORKDIR}/llvm-${PV}.src" LLVM_BUILD_DIR = "${WORKDIR}/llvm-${PV}.build"
@@ -42,6 +38,7 @@ EXTRA_OECONF += "--disable-assertions \ --enable-debug-runtime \ --disable-expensive-checks \ --enable-bindings=none \ + --enable-jit \ --enable-keep-symbols \ --enable-libffi \ --enable-optimized \
meta-oe/recipes-core/llvm/llvm3.3_3.3.bb +7 -0
@@ -1,5 +1,12 @@ +LLVM_SRC_EXT ?= "gz" + require llvm.inc +# 3-clause BSD-like +# University of Illinois/NCSA Open Source License +LICENSE = "NCSA" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8" + DEPENDS += "zlib" EXTRA_OECONF += "--enable-zlib"
meta-oe/recipes-core/llvm/llvm3.5/arm_fenv_uclibc.patch new file +14 -0
@@ -0,0 +1,14 @@ +Index: llvm-2.9/include/llvm/Support/FEnv.h +=================================================================== +--- llvm-2.9.orig/include/llvm/Support/FEnv.h 2010-11-29 20:44:50.000000000 +0100 ++++ llvm-2.9/include/llvm/Support/FEnv.h 2011-11-18 18:42:22.580161297 +0100 +@@ -17,6 +17,9 @@ + + #include "llvm/Config/config.h" + #include <cerrno> ++ ++#undef HAVE_FENV_H ++ + #ifdef HAVE_FENV_H + #include <fenv.h> + #endif
meta-oe/recipes-core/llvm/llvm3.5_3.5.2.bb new file +25 -0
@@ -0,0 +1,25 @@ +require llvm.inc + +# 3-clause BSD-like +# University of Illinois/NCSA Open Source License +LICENSE = "NCSA" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=47e311aa9caedd1b3abf098bd7814d1d" + +DEPENDS += "zlib" +EXTRA_OECONF += "--enable-zlib" + +SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch " + +SRC_URI[md5sum] = "f5a4dc595f7e8bd23397684d0906d014" +SRC_URI[sha256sum] = "44196156d5749eb4b4224fe471a29cc3984df92570a4a89fa859f7394fc0c575" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[r600] = "--enable-experimental-targets=R600,,," + +# Fails to build with thumb-1 (qemuarm) +# | {standard input}: Assembler messages: +# | {standard input}:22: Error: selected processor does not support Thumb mode `stmdb sp!,{r0,r1,r2,r3,lr}' +# | {standard input}:31: Error: lo register required -- `ldmia sp!,{r0,r1,r2,r3,lr}' +# | {standard input}:32: Error: lo register required -- `ldr pc,[sp],#4' +# | make[3]: *** [/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/llvm3.3/3.3-r0/llvm-3.3.build/lib/Target/ARM/Release/ARMJITInfo.o] Error 1 +ARM_INSTRUCTION_SET = "arm"
Signature · 5 lines
1.9.1 -- Jens Rehsack - [email protected]
Quoted 7 lines · Jens Rehsack
llvm introduced new JIT technology MCJIT with llvm 3.4 and fixes ARM in 3.5 (see http://llvm.org/releases/3.5.2/docs/ReleaseNotes.html#changes-to-the-arm-backend).
Ensure JIT is built with llvm
Signed-off-by Jens Rehsack <[email protected]>
There is a patch to add LLVM 3.7[1]; I think this one can be dropped.
1. http://patchwork.openembedded.org/patch/106281/
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Quoted 8 lines
Am 27.10.2015 um 21:15 schrieb Otavio Salvador <[email protected]>:
Quoted 4 lines · Jens Rehsack
llvm introduced new JIT technology MCJIT with llvm 3.4 and fixes ARM in 3.5 (see http://llvm.org/releases/3.5.2/docs/ReleaseNotes.html#changes-to-the-arm-backend).
Quoted 7 lines
Quoted 3 lines
Ensure JIT is built with llvm
Signed-off-by Jens Rehsack <[email protected]>There is a patch to add LLVM 3.7[1]; I think this one can be dropped.
I'v seen this and I guarantee that OpenJDK-8 will fail heavily with llvm3.7 - the guys put an end to an antiquated API's with each release, and OpenJDK's zeroshark uses lot's of them.
Cheers
Signature · 1 line
Jens Rehsack - [email protected]
Quoted 12 lines · Jens Rehsack
Quoted 12 lines
Am 27.10.2015 um 21:15 schrieb Otavio Salvador <[email protected]>:
Quoted 7 lines · Jens Rehsack
llvm introduced new JIT technology MCJIT with llvm 3.4 and fixes ARM in 3.5 (see http://llvm.org/releases/3.5.2/docs/ReleaseNotes.html#changes-to-the-arm-backend).
Ensure JIT is built with llvm
Signed-off-by Jens Rehsack <[email protected]>
Quoted 7 lines
Quoted 3 lines
There is a patch to add LLVM 3.7[1]; I think this one can be dropped.
I'v seen this and I guarantee that OpenJDK-8 will fail heavily with llvm3.7 - the guys put an end to an antiquated API's with each release, and OpenJDK's zeroshark uses lot's of them.
So we will need to figure how to deal with this. I see following options:
- add needed llvm recipe in meta-java (I dislike this)
- fix openjdk
- update openjdk so it work with 3.7 (preferred)
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Quoted 24 lines
Am 27.10.2015 um 21:24 schrieb Otavio Salvador <[email protected]>:
Quoted 12 lines · Jens Rehsack
Quoted 12 lines
Am 27.10.2015 um 21:15 schrieb Otavio Salvador <[email protected]>:
Quoted 7 lines · Jens Rehsack
llvm introduced new JIT technology MCJIT with llvm 3.4 and fixes ARM in 3.5 (see http://llvm.org/releases/3.5.2/docs/ReleaseNotes.html#changes-to-the-arm-backend).
Ensure JIT is built with llvm
Signed-off-by Jens Rehsack <[email protected]>Quoted 7 lines
Quoted 3 lines
There is a patch to add LLVM 3.7[1]; I think this one can be dropped.
I'v seen this and I guarantee that OpenJDK-8 will fail heavily with llvm3.7 - the guys put an end to an antiquated API's with each release, and OpenJDK's zeroshark uses lot's of them.
Quoted 5 lines
So we will need to figure how to deal with this. I see following options:
- add needed llvm recipe in meta-java (I dislike this)
- fix openjdk
- update openjdk so it work with 3.7 (preferred)
I would prefer that, too - but we have to find a sponsor for that.
We also have the option to have an llvm3.5 for a while in meta-oe ;)
Cheers
Signature · 1 line
Jens Rehsack - [email protected]
Quoted 21 lines · Otavio Salvador
Quoted 12 lines · Jens Rehsack
Quoted 12 lines
Am 27.10.2015 um 21:15 schrieb Otavio Salvador <[email protected]>:
Quoted 7 lines · Jens Rehsack
llvm introduced new JIT technology MCJIT with llvm 3.4 and fixes ARM in 3.5 (see http://llvm.org/releases/3.5.2/docs/ReleaseNotes.html#changes-to-the-arm-backend).
Ensure JIT is built with llvm
Signed-off-by Jens Rehsack <[email protected]>Quoted 7 lines
Quoted 3 lines
There is a patch to add LLVM 3.7[1]; I think this one can be dropped.
I'v seen this and I guarantee that OpenJDK-8 will fail heavily with llvm3.7 - the guys put an end to an antiquated API's with each release, and OpenJDK's zeroshark uses lot's of them.
Quoted 5 lines
So we will need to figure how to deal with this. I see following options:
- add needed llvm recipe in meta-java (I dislike this)
- fix openjdk
- update openjdk so it work with 3.7 (preferred)
I don't mind having all 3 llvm versions in parallel until all this is sorted out.
People can select the right one based on mesa version they are using and 3.8 for OpenJDK.
But I would appreciate this recipe rebased on top of Philip's (or vice versa), because I don't have spare time to text it with newer mesa Philip is using or with OpenJDK Jens is using.
Regards,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 34 lines
Am 27.10.2015 um 21:32 schrieb Martin Jansa <[email protected]>:
Quoted 21 lines · Otavio Salvador
Quoted 12 lines · Jens Rehsack
Quoted 12 lines
Am 27.10.2015 um 21:15 schrieb Otavio Salvador <[email protected]>:
Quoted 7 lines · Jens Rehsack
llvm introduced new JIT technology MCJIT with llvm 3.4 and fixes ARM in 3.5 (see http://llvm.org/releases/3.5.2/docs/ReleaseNotes.html#changes-to-the-arm-backend).
Ensure JIT is built with llvm
Signed-off-by Jens Rehsack <[email protected]>Quoted 7 lines
Quoted 3 lines
There is a patch to add LLVM 3.7[1]; I think this one can be dropped.
I'v seen this and I guarantee that OpenJDK-8 will fail heavily with llvm3.7 - the guys put an end to an antiquated API's with each release, and OpenJDK's zeroshark uses lot's of them.
Quoted 5 lines
So we will need to figure how to deal with this. I see following options:
- add needed llvm recipe in meta-java (I dislike this)
- fix openjdk
- update openjdk so it work with 3.7 (preferred)I don't mind having all 3 llvm versions in parallel until all this is sorted out.
Quoted 6 lines
People can select the right one based on mesa version they are using and 3.8 for OpenJDK.
But I would appreciate this recipe rebased on top of Philip's (or vice versa), because I don't have spare time to text it with newer mesa Philip is using or with OpenJDK Jens is using.
Since OpenJDK waits for autoconf patch anyway, I'm happy to rebase my patch when Philip's is in.
I'm also happy to try out how complex a move to 3.7 will be for openjdk-8 if I find a tuit. I think, next week or so we'll make an initial decision about our way to get a JVM with JIT support.
Cheers
Signature · 1 line
Jens Rehsack - [email protected]
Quoted 12 lines · Jens Rehsack
Quoted 12 lines
Am 27.10.2015 um 21:15 schrieb Otavio Salvador <[email protected]>:
Quoted 7 lines · Jens Rehsack
llvm introduced new JIT technology MCJIT with llvm 3.4 and fixes ARM in 3.5 (see http://llvm.org/releases/3.5.2/docs/ReleaseNotes.html#changes-to-the-arm-backend).
Ensure JIT is built with llvm
Signed-off-by Jens Rehsack <[email protected]>
Quoted 7 lines
Quoted 3 lines
There is a patch to add LLVM 3.7[1]; I think this one can be dropped.
I'v seen this and I guarantee that OpenJDK-8 will fail heavily with llvm3.7 - the guys put an end to an antiquated API's with each release, and OpenJDK's zeroshark uses lot's of them.
We'll need the 3.7 series llvm to support llvmpipe in newer mesa. The mesa update will happen after the release and I want to be ready.
As Martin notes, we are setup to support multiple llvm versions and it looks like we need to.
Philip
Quoted 3 lines
Cheers