diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-05-13 16:55:26 +0100 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-05-13 16:55:26 +0100 |
commit | 505c26951b14898cb9ede7c4cb76217202b655c4 (patch) | |
tree | cb8dcbf5af8e74ddfbf3716504c9f0de5ca5f212 /meta/packages/linux/files | |
parent | ad136ddeef5cc70ec76967b0560da42898e33e70 (diff) | |
download | poky-505c26951b14898cb9ede7c4cb76217202b655c4.tar.gz |
linux: Ensure we have buildable kernel recipes for each machine
Fix various kernels to build with our toolchain, this includes well known fixes
for:
* sumversion.c: compilation failing with a 'PATH_MAX' undeclared (fixed by
adding limits.h to sumversions includes
* a patch taken from oe.dev to stop GCC >= 4.3 from optimizing a loop which
causes compilation to fail
* Fixing the KERNEL_OUTPUT for mx31 and nokia800 kernel recipes
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta/packages/linux/files')
-rw-r--r-- | meta/packages/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch | 48 | ||||
-rw-r--r-- | meta/packages/linux/files/sumversion-fix.patch | 16 |
2 files changed, 64 insertions, 0 deletions
diff --git a/meta/packages/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch b/meta/packages/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch new file mode 100644 index 0000000000..3ff0c07c18 --- /dev/null +++ b/meta/packages/linux/files/1300-fix-gcc-4.3-false-modulo-optimization.patch.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From f5b973489beb1a1239dfad53e3ad6e36ff7ee958 Mon Sep 17 00:00:00 2001 | ||
2 | From: Segher Boessenkool <segher@kernel.crashing.org> | ||
3 | Date: Thu, 9 Oct 2008 21:18:27 +0100 | ||
4 | Subject: [PATCH] fix-gcc-4.3-false-modulo-optimization.patch | ||
5 | |||
6 | I tried to compile the current stable kernel | ||
7 | (a2ef813d2f439a3e9f377d33a2e5baad098afb7e) | ||
8 | and get the following errors: | ||
9 | |||
10 | kernel/built-in.o: In function `timespec_add_ns': | ||
11 | /mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:174: | ||
12 | undefined reference to `__aeabi_uldivmod' | ||
13 | /mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:179: | ||
14 | undefined reference to `__aeabi_uldivmod' | ||
15 | /mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:174: | ||
16 | undefined reference to `__aeabi_uldivmod' | ||
17 | /mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:179: | ||
18 | undefined reference to `__aeabi_uldivmod' | ||
19 | |||
20 | applying the following patch solved the problem: | ||
21 | -------- | ||
22 | Prevent gcc-4.3 form "optimizing" the while loop into a costly modulo operation. | ||
23 | Patch found at http://lkml.org/lkml/2008/2/22/464. | ||
24 | |||
25 | Reported-by: Sven Rebhan <odinshorse@googlemail.com> | ||
26 | Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> | ||
27 | --- | ||
28 | include/linux/time.h | 4 ++++ | ||
29 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
30 | |||
31 | diff --git a/include/linux/time.h b/include/linux/time.h | ||
32 | index b04136d..3e8fd9e 100644 | ||
33 | --- a/include/linux/time.h | ||
34 | +++ b/include/linux/time.h | ||
35 | @@ -173,6 +173,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns) | ||
36 | { | ||
37 | ns += a->tv_nsec; | ||
38 | while(unlikely(ns >= NSEC_PER_SEC)) { | ||
39 | + /* The following asm() prevents the compiler from | ||
40 | + * optimising this loop into a modulo operation. */ | ||
41 | + asm("" : "+r"(ns)); | ||
42 | + | ||
43 | ns -= NSEC_PER_SEC; | ||
44 | a->tv_sec++; | ||
45 | } | ||
46 | -- | ||
47 | 1.5.6.5 | ||
48 | |||
diff --git a/meta/packages/linux/files/sumversion-fix.patch b/meta/packages/linux/files/sumversion-fix.patch new file mode 100644 index 0000000000..8158d9d5f8 --- /dev/null +++ b/meta/packages/linux/files/sumversion-fix.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Fix compilation of the sumversion "script" | ||
2 | |||
3 | http://bugs.gentoo.org/show_bug.cgi?format=multiple&id=226169 | ||
4 | |||
5 | Index: linux-2.6.21/scripts/mod/sumversion.c | ||
6 | =================================================================== | ||
7 | --- linux-2.6.21.orig/scripts/mod/sumversion.c 2007-04-26 04:08:32.000000000 +0100 | ||
8 | +++ linux-2.6.21/scripts/mod/sumversion.c 2010-05-13 14:41:31.777882280 +0100 | ||
9 | @@ -7,6 +7,7 @@ | ||
10 | #include <ctype.h> | ||
11 | #include <errno.h> | ||
12 | #include <string.h> | ||
13 | +#include <limits.h> | ||
14 | #include "modpost.h" | ||
15 | |||
16 | /* | ||