linux-rp_2.6.24: added fix for gcc 4.3 compatibility
PATCH 1/1 linux-rp_2.6.24: added fix for gcc 4.3 compatibility
* 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
recipes/linux/linux-rp-2.6.24/gcc-4.3-fix.patch new file +27 -0
@@ -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 <[email protected]> +--- + 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 + +
recipes/linux/linux-rp_2.6.24.bb +2 -1
@@ -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 \
Signature · 1 line
1.5.4.3