[oe] [PATCH] linux-rp_2.6.24: added fix for gcc 4.3 compatibility
Henry von Tresckow
hvontres at gmail.com
Sun May 31 04:28:55 UTC 2009
* Added patch to include/linux/time.h to make gcc 4.3 happy. This may
be needed for other 2.6.24 or older kernel recipies.
Original source of patch: http://lkml.org/lkml/2008/2/22/464
---
recipes/linux/linux-rp-2.6.24/gcc-4.3-fix.patch | 27 +++++++++++++++++++++++
recipes/linux/linux-rp_2.6.24.bb | 3 +-
2 files changed, 29 insertions(+), 1 deletions(-)
create mode 100644 recipes/linux/linux-rp-2.6.24/gcc-4.3-fix.patch
diff --git a/recipes/linux/linux-rp-2.6.24/gcc-4.3-fix.patch b/recipes/linux/linux-rp-2.6.24/gcc-4.3-fix.patch
new file mode 100644
index 0000000..8ac2600
--- /dev/null
+++ b/recipes/linux/linux-rp-2.6.24/gcc-4.3-fix.patch
@@ -0,0 +1,27 @@
+Prevent the loop in timespec_add_ns() to be optimised away
+since some architectures don't support __udivdi3() (and
+we don't want to use that, anyway).
+
+Signed-off-by: Segher Boessenkool <segher at kernel.crashing.org>
+---
+ include/linux/time.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+diff --git a/include/linux/time.h b/include/linux/time.h
+index 2091a19..d32ef0a 100644
+--- a/include/linux/time.h
++++ b/include/linux/time.h
+@@ -174,6 +174,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
+ {
+ ns += a->tv_nsec;
+ while(unlikely(ns >= NSEC_PER_SEC)) {
++ /* The following asm() prevents the compiler from
++ * optimising this loop into a modulo operation. */
++ asm("" : "+r"(ns));
++
+ ns -= NSEC_PER_SEC;
+ a->tv_sec++;
+ }
+--
+1.5.4.2.184.gb23b
+
+
diff --git a/recipes/linux/linux-rp_2.6.24.bb b/recipes/linux/linux-rp_2.6.24.bb
index 7b06916..6f9b3c5 100644
--- a/recipes/linux/linux-rp_2.6.24.bb
+++ b/recipes/linux/linux-rp_2.6.24.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r22"
+PR = "r23"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_collie = "1"
@@ -48,6 +48,7 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
${RPSRC}/poodle_pm-r5.patch;patch=1 \
${RPSRC}/poodle_lcd_hack-r0.patch;patch=1 \
${RPSRC}/poodle_asoc_fix-r1.patch;patch=1 \
+ file://gcc-4.3-fix.patch;patch=1 \
file://pxa27x-resume.patch;patch=1;status=external \
file://mtd-module.patch;patch=1;status=external \
file://wm8750-treble.patch;patch=1;status=external \
--
1.5.4.3
More information about the Openembedded-devel
mailing list