]> code.ossystems Code Review - openembedded-core.git/commitdiff
linux-openmoko: fix build with gcc 4.3.1
authorMarcin Juszkiewicz <hrw@openedhand.com>
Fri, 25 Jul 2008 09:27:55 +0000 (09:27 +0000)
committerMarcin Juszkiewicz <hrw@openedhand.com>
Fri, 25 Jul 2008 09:27:55 +0000 (09:27 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4946 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/linux/linux-openmoko/timespec_add_ns_avoid_udivdi3.patch [new file with mode: 0644]
meta/packages/linux/linux-openmoko_2.6.24+git.bb

diff --git a/meta/packages/linux/linux-openmoko/timespec_add_ns_avoid_udivdi3.patch b/meta/packages/linux/linux-openmoko/timespec_add_ns_avoid_udivdi3.patch
new file mode 100644 (file)
index 0000000..4aba897
--- /dev/null
@@ -0,0 +1,20 @@
+Backport of this patch here
+
+http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg270684.html
+
+Needed for 2.6.24 to compile with gcc 4.3
+Index: linux-2.6.24/include/linux/time.h
+===================================================================
+--- linux-2.6.24.orig/include/linux/time.h     2008-05-28 15:39:46.000000000 -0700
++++ linux-2.6.24/include/linux/time.h  2008-05-28 15:40:48.000000000 -0700
+@@ -173,6 +173,10 @@
+ {
+       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++;
+       }
index ee3203daf3f5bf4fc2c87ed1c0db9a6ff7e90009..a1d573be17fb7bc21bfff114f07226f0b8c6fa17 100644 (file)
@@ -5,9 +5,10 @@ DESCRIPTION = "Linux 2.6.x (development) kernel for FIC SmartPhones shipping w/
 
 PE = "1"
 PV = "${KERNEL_RELEASE}+git${SRCREV}"
-PR = "r1"
+PR = "r2"
 
-SRC_URI = "git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable"
+SRC_URI = "git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \
+           file://timespec_add_ns_avoid_udivdi3.patch;patch=1"
 
 S = "${WORKDIR}/git"