fix-gcc-4.3-false-modulo-optimization.patch
commit7021c95c3181d29868a1d89109c5a3ee8e5dcccc
authorSegher Boessenkool <segher@kernel.crashing.org>
Thu, 9 Oct 2008 20:18:27 +0000 (9 21:18 +0100)
committerMike Westerhof <mwester@dls.net>
Sat, 11 Oct 2008 15:49:46 +0000 (11 10:49 -0500)
treeb105b29b627bb427c87e2a285baa9c4979e6f438
parent39b69f74ee5c198cf6d65589b2f0c6a0f32a98ee
fix-gcc-4.3-false-modulo-optimization.patch

I tried to compile the current stable kernel
(a2ef813d2f439a3e9f377d33a2e5baad098afb7e)
and get the following errors:

kernel/built-in.o: In function `timespec_add_ns':
/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:174:
undefined reference to `__aeabi_uldivmod'
/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:179:
undefined reference to `__aeabi_uldivmod'
/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:174:
undefined reference to `__aeabi_uldivmod'
/mnt/data/Freerunner/Gentoo/rootinstall/usr/src/linux/include/linux/time.h:179:
undefined reference to `__aeabi_uldivmod'

applying the following patch solved the problem:
--------
Prevent gcc-4.3 form "optimizing" the while loop into a costly modulo operation.
Patch found at http://lkml.org/lkml/2008/2/22/464.

Reported-by: Sven Rebhan <odinshorse@googlemail.com>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
include/linux/time.h