On Sat, Apr 21, 2001 at 10:17:28PM +0200, Jochen Striepe wrote:
> 2.4.4-pre6 actually is the 4th 2.4.4pre-Patch that does not compile
> without further patching on my system. :-(
> rwsem.o(.text+0x30): undefined reference to `__builtin_expect'
> rwsem.o(.text+0x73): undefined reference to `__builtin_expect'
Its because you're using a version of gcc which doesn't have
__builtin_expect (eg, egcs 1.1.2, some versions of gcc 2.95).
I'm told that gcc 2.95.[12] are not suitable for kernel compilation...
I've currently got the following in my tree (sorry, no diff since I've
got other changes in this file). lib/rwsem.c, line 9, add:
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
#define __builtin_expect(exp,c) (exp)
#endif
I'm not sure if this is correct, or which compilers work, which don't
(so don't anyone go and drop it into Linus/Alans kernels), but it
seems to work for me.
-- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Apr 23 2001 - 21:00:40 EST