Patchwork [meta-oe,2/3] llvm2.9: fix build with gcc-4.7

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

Comments

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

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 = ""