Patchwork llvm2.7_2.7: Add patch for build errors on newer gcc / glibc combinations

login
register
mail settings
Submitter Stefan Schmidt
Date May 9, 2011, 7:41 a.m.
Message ID <1304926905-4739-1-git-send-email-stefan@datenfreihafen.org>
Download mbox | patch
Permalink /patch/3471/
State Accepted
Headers show

Comments

Stefan Schmidt - May 9, 2011, 7:41 a.m.
From: Stefan Schmidt <stefan@buglabs.net>

Its seems there is a stricter header checking again which results in errors like
this:
error: 'ptrdiff_t' does not name a type

This happens on my Debian SID system. Adding the needed includes fixes the
build.

Signed-off-by: Stefan Schmidt <stefan@buglabs.net>
---
 recipes/llvm/llvm2.7/include-fixes.patch |   55 ++++++++++++++++++++++++++++++
 recipes/llvm/llvm2.7_2.7.bb              |    3 +-
 2 files changed, 57 insertions(+), 1 deletions(-)
 create mode 100644 recipes/llvm/llvm2.7/include-fixes.patch
Stefan Schmidt - May 13, 2011, 11:20 a.m.
Hello.

On Mon, 2011-05-09 at 09:41, Stefan Schmidt wrote:
> From: Stefan Schmidt <stefan@buglabs.net>
> 
> Its seems there is a stricter header checking again which results in errors like
> this:
> error: 'ptrdiff_t' does not name a type
> 
> This happens on my Debian SID system. Adding the needed includes fixes the
> build.

Have I take no reaction as agreement here? ;)

As it is a build fix I'm going to push this later today if no-one
objects.

regards
Stefan Schmidt

Patch

diff --git a/recipes/llvm/llvm2.7/include-fixes.patch b/recipes/llvm/llvm2.7/include-fixes.patch
new file mode 100644
index 0000000..9e71e40
--- /dev/null
+++ b/recipes/llvm/llvm2.7/include-fixes.patch
@@ -0,0 +1,55 @@ 
+Fixes stricter includes which result in failures like this:
+error: 'ptrdiff_t' does not name a type
+
+Upstream-Status: Unknown, not submitted as 2.7 is very old
+
+Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
+
+Index: llvm-2.7/include/llvm/ADT/SmallVector.h
+===================================================================
+--- llvm-2.7.orig/include/llvm/ADT/SmallVector.h	2011-05-08 17:07:09.000000000 +0200
++++ llvm-2.7/include/llvm/ADT/SmallVector.h	2011-05-08 17:07:25.000000000 +0200
+@@ -19,6 +19,7 @@
+ #include <cassert>
+ #include <cstring>
+ #include <memory>
++#include <stddef.h>
+ 
+ #ifdef _MSC_VER
+ namespace std {
+Index: llvm-2.7/include/llvm/ADT/ilist.h
+===================================================================
+--- llvm-2.7.orig/include/llvm/ADT/ilist.h	2011-05-08 20:24:57.000000000 +0200
++++ llvm-2.7/include/llvm/ADT/ilist.h	2011-05-08 20:25:12.000000000 +0200
+@@ -40,6 +40,7 @@
+ 
+ #include <cassert>
+ #include <iterator>
++#include <stddef.h>
+ 
+ namespace llvm {
+ 
+Index: llvm-2.7/include/llvm/Use.h
+===================================================================
+--- llvm-2.7.orig/include/llvm/Use.h	2011-05-08 20:28:21.000000000 +0200
++++ llvm-2.7/include/llvm/Use.h	2011-05-08 20:28:37.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include "llvm/Support/Casting.h"
+ #include "llvm/ADT/PointerIntPair.h"
+ #include <iterator>
++#include <stddef.h>
+ 
+ namespace llvm {
+ 
+Index: llvm-2.7/include/llvm/ADT/DenseMap.h
+===================================================================
+--- llvm-2.7.orig/include/llvm/ADT/DenseMap.h	2011-05-08 20:32:11.000000000 +0200
++++ llvm-2.7/include/llvm/ADT/DenseMap.h	2011-05-08 20:32:21.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include <utility>
+ #include <cassert>
+ #include <cstring>
++#include <stddef.h>
+ 
+ namespace llvm {
+ 
diff --git a/recipes/llvm/llvm2.7_2.7.bb b/recipes/llvm/llvm2.7_2.7.bb
index 4353622..12755db 100644
--- a/recipes/llvm/llvm2.7_2.7.bb
+++ b/recipes/llvm/llvm2.7_2.7.bb
@@ -1,6 +1,6 @@ 
 require llvm.inc
 
-PR = "r9"
+PR = "r10"
 
 DEPENDS = "llvm-common llvm2.7-native"
 
@@ -15,6 +15,7 @@  SRC_URI += "\
   file://r104652-VFPLoadStoreMultiple.patch \
   file://r104653-BFC-BFI.patch \
   file://rawMOVLRPC.patch \
+  file://include-fixes.patch \
   "
 
 LLVM_RELEASE = "2.7"