Patchwork [meta-oe,1/3] llvm2.9: Import from meta-java

login
register
mail settings
Submitter Martin Jansa
Date April 19, 2013, 2:02 p.m.
Message ID <1366380143-12256-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/48577/
State Accepted, archived
Commit 265e58da86ee32c86ab52c24b2d8ce4a7cc508a0
Headers show

Comments

Martin Jansa - April 19, 2013, 2:02 p.m.
* 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

Patch

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"