* [meta-oe][PATCH 1/3] llvm2.9: Import from meta-java @ 2013-04-19 14:02 Martin Jansa 2013-04-19 14:02 ` [meta-oe][PATCH 2/3] llvm2.9: fix build with gcc-4.7 Martin Jansa 2013-04-19 14:02 ` [meta-oe][PATCH 3/3] llvm2.9: try to fix thumb build and disable it after failure Martin Jansa 0 siblings, 2 replies; 5+ messages in thread From: Martin Jansa @ 2013-04-19 14:02 UTC (permalink / raw) To: openembedded-devel * llvm is generic enough to be useful outside meta-java e.g. we need it to enable llvmpipe galium driver in mesa * imported without any modification (except indentation), all credits go to Henning Heinold and Khem Raj for maintaining it in meta-java Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- .../llvm/llvm2.9/arm_fenv_uclibc.patch | 14 +++++++++++ meta-oe/recipes-core/llvm/llvm2.9_2.9.bb | 29 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 meta-oe/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch create mode 100644 meta-oe/recipes-core/llvm/llvm2.9_2.9.bb diff --git a/meta-oe/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch b/meta-oe/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch new file mode 100644 index 0000000..c3ae494 --- /dev/null +++ b/meta-oe/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch @@ -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 diff --git a/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb b/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb new file mode 100644 index 0000000..68cf70b --- /dev/null +++ b/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb @@ -0,0 +1,29 @@ +require llvm.inc + +PR = "${INC_PR}.0" + +SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch " + +PARALLEL_MAKE_virtclass-native = "" + +EXTRA_OECMAKE = "\ + -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm${LLVM_RELEASE}/tblgen \ + -DLLVM_TARGETS_TO_BUILD="X86;${LLVM_ARCH}" \ + -DCMAKE_LINKER:FILEPATH=${LD} \ + -DCMAKE_AR:FILEPATH=${AR} \ + -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \ + -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \ + -DCMAKE_RANLIB:FILEPATH=${RANLIB} \ + -DCMAKE_STRIP:FILEPATH=${STRIP} \ + -DNM_PATH:FILEPATH=${NM} \ + -DLLVM_ENABLE_PIC:BOOL=ON \ + -DLLVM_TARGET_ARCH:STRING=${LLVM_ARCH} \ + -DLLVM_ENABLE_ASSERTIONS:BOOL=ON \ + -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ + -DBUILD_SHARED_LIBS:BOOL=ON \ +" + +LLVM_RELEASE = "2.9" + +SRC_URI[md5sum] = "793138412d2af2c7c7f54615f8943771" +SRC_URI[sha256sum] = "661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779" -- 1.8.2.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [meta-oe][PATCH 2/3] llvm2.9: fix build with gcc-4.7 2013-04-19 14:02 [meta-oe][PATCH 1/3] llvm2.9: Import from meta-java Martin Jansa @ 2013-04-19 14:02 ` Martin Jansa 2013-04-19 14:02 ` [meta-oe][PATCH 3/3] llvm2.9: try to fix thumb build and disable it after failure Martin Jansa 1 sibling, 0 replies; 5+ messages in thread From: Martin Jansa @ 2013-04-19 14:02 UTC (permalink / raw) To: openembedded-devel Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- meta-oe/recipes-core/llvm/llvm2.9/0035-gcc-4.7.patch | 16 ++++++++++++++++ meta-oe/recipes-core/llvm/llvm2.9_2.9.bb | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 meta-oe/recipes-core/llvm/llvm2.9/0035-gcc-4.7.patch diff --git a/meta-oe/recipes-core/llvm/llvm2.9/0035-gcc-4.7.patch b/meta-oe/recipes-core/llvm/llvm2.9/0035-gcc-4.7.patch new file mode 100644 index 0000000..4cf8d44 --- /dev/null +++ b/meta-oe/recipes-core/llvm/llvm2.9/0035-gcc-4.7.patch @@ -0,0 +1,16 @@ +Upstream-Status: Pending + +Imported from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673266 + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- a/lib/ExecutionEngine/JIT/Intercept.cpp 2012-05-17 16:11:46.956180361 +0200 ++++ b/lib/ExecutionEngine/JIT/Intercept.cpp 2012-05-17 16:14:35.256184996 +0200 +@@ -52,6 +52,7 @@ + #include <sys/stat.h> + #endif + #include <fcntl.h> ++#include <unistd.h> + /* stat functions are redirecting to __xstat with a version number. On x86-64 + * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat' + * available as an exported symbol, so we have to add it explicitly. diff --git a/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb b/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb index 68cf70b..d5b8c01 100644 --- a/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb +++ b/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb @@ -2,6 +2,8 @@ require llvm.inc PR = "${INC_PR}.0" +SRC_URI += "file://0035-gcc-4.7.patch" + SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch " PARALLEL_MAKE_virtclass-native = "" -- 1.8.2.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [meta-oe][PATCH 3/3] llvm2.9: try to fix thumb build and disable it after failure 2013-04-19 14:02 [meta-oe][PATCH 1/3] llvm2.9: Import from meta-java Martin Jansa 2013-04-19 14:02 ` [meta-oe][PATCH 2/3] llvm2.9: fix build with gcc-4.7 Martin Jansa @ 2013-04-19 14:02 ` Martin Jansa 2013-04-20 9:46 ` Henning Heinold 1 sibling, 1 reply; 5+ messages in thread From: Martin Jansa @ 2013-04-19 14:02 UTC (permalink / raw) To: openembedded-devel * khem: could you check what I'm doing wrong? This is out of my league.. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- .../recipes-core/llvm/llvm2.9/0019-issue6065.patch | 35 ++++++++++++++++++++++ meta-oe/recipes-core/llvm/llvm2.9_2.9.bb | 9 ++++++ 2 files changed, 44 insertions(+) create mode 100644 meta-oe/recipes-core/llvm/llvm2.9/0019-issue6065.patch diff --git a/meta-oe/recipes-core/llvm/llvm2.9/0019-issue6065.patch b/meta-oe/recipes-core/llvm/llvm2.9/0019-issue6065.patch new file mode 100644 index 0000000..aff3d1d --- /dev/null +++ b/meta-oe/recipes-core/llvm/llvm2.9/0019-issue6065.patch @@ -0,0 +1,35 @@ +--- llvm-2.9.orig/lib/Target/ARM/ARMJITInfo.cpp 2013-04-19 14:49:28.063566919 +0200 ++++ llvm-2.9/lib/Target/ARM/ARMJITInfo.cpp 2013-04-19 15:24:31.065435029 +0200 +@@ -59,7 +59,17 @@ + // for the real target function right now. We have to act as if this + // whole compilation callback doesn't exist as far as the caller is + // concerned, so we can't just preserve the callee saved regs. ++ // stmdb introduced in http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?diff_format=h&r1=57911&r2=57910&pathrev=57911 ++ // but fails on armv4t ++ // | {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' ++#ifndef __thumb__ + "stmdb sp!, {r0, r1, r2, r3, lr}\n" ++#else ++ "push {r0, r1, r2, r3, lr}\n" ++#endif + #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) + "fstmfdd sp!, {d0, d1, d2, d3, d4, d5, d6, d7}\n" + #endif +@@ -99,8 +109,14 @@ + // The above twiddling of the saved return addresses allows us to + // deallocate everything, including the LR the stub saved, with two + // updating load instructions. ++#ifndef __thumb__ + "ldmia sp!, {r0, r1, r2, r3, lr}\n" + "ldr pc, [sp], #4\n" ++#else ++ // thumb dont allow lr and pc to be poped in the same instruction. ++ "pop {r0, r1, r2, r3, lr}\n" ++ "pop {pc}\n" ++#endif + ); + #else // Not an ARM host + void ARMCompilationCallback() { diff --git a/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb b/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb index d5b8c01..dc7f873 100644 --- a/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb +++ b/meta-oe/recipes-core/llvm/llvm2.9_2.9.bb @@ -4,6 +4,15 @@ PR = "${INC_PR}.0" SRC_URI += "file://0035-gcc-4.7.patch" +# 0019-issue6065.patch is still needed but a bit modified, because it was resolved by +# http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?r1=120304&r2=124694&pathrev=124694 +# http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?diff_format=h&r1=57911&r2=57910&pathrev=57911 +# and still it fails with +# {standard input}:31: Error: invalid register list to push/pop instruction -- `pop {r0,r1,r2,r3,lr}' +# make[2]: *** [lib/Target/ARM/CMakeFiles/LLVMARMCodeGen.dir/ARMJITInfo.cpp.o] Error 1 +# SRC_URI += "file://0019-issue6065.patch" +ARM_INSTRUCTION_SET = "arm" + SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch " PARALLEL_MAKE_virtclass-native = "" -- 1.8.2.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [meta-oe][PATCH 3/3] llvm2.9: try to fix thumb build and disable it after failure 2013-04-19 14:02 ` [meta-oe][PATCH 3/3] llvm2.9: try to fix thumb build and disable it after failure Martin Jansa @ 2013-04-20 9:46 ` Henning Heinold 2013-04-20 10:24 ` Martin Jansa 0 siblings, 1 reply; 5+ messages in thread From: Henning Heinold @ 2013-04-20 9:46 UTC (permalink / raw) To: openembedded-devel Hi Martin, sorry to say but arm support on 2.9 is broken in serval way. I put it in mostly for testing purpose. Maybe with upcoming llvm 3.3 the arm situation will be better. Bye Henning ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-oe][PATCH 3/3] llvm2.9: try to fix thumb build and disable it after failure 2013-04-20 9:46 ` Henning Heinold @ 2013-04-20 10:24 ` Martin Jansa 0 siblings, 0 replies; 5+ messages in thread From: Martin Jansa @ 2013-04-20 10:24 UTC (permalink / raw) To: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 807 bytes --] On Sat, Apr 20, 2013 at 11:46:05AM +0200, Henning Heinold wrote: > Hi Martin, > > sorry to say but arm support on 2.9 is broken in serval way. I put Yes I also got this feeling :/. > it in mostly for testing purpose. Maybe with upcoming llvm 3.3 the arm situation > will be better. Well when I was checking if there is thumb fix later in git repo for backport I haven't found it, so we'll probably need to fix thumb also for 3.3.. I wanted to add 2.9 only to be able to remove both from meta-java without loosing anything and this at least fixes build so I don't have another recipe in error in jenkins builds. Also mesa documentation says that 2.9 is recommended llvm version (but it supports different versions too) -- Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 205 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-20 10:41 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-04-19 14:02 [meta-oe][PATCH 1/3] llvm2.9: Import from meta-java Martin Jansa 2013-04-19 14:02 ` [meta-oe][PATCH 2/3] llvm2.9: fix build with gcc-4.7 Martin Jansa 2013-04-19 14:02 ` [meta-oe][PATCH 3/3] llvm2.9: try to fix thumb build and disable it after failure Martin Jansa 2013-04-20 9:46 ` Henning Heinold 2013-04-20 10:24 ` Martin Jansa
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.