Re: Linux 2.4.3-ac12

Alan Cox
2001-04-22T12:10:13Z

> > o Further semaphore fixes (David
> Howells)
>
> rwsem.o(.text+0x73): undefined reference to `__builtin_expect'
> /usr/src/linux-2.4.3-ac12/lib/lib.a(rwsem.o): In function
> `rwsem_down_write_failed':

This is from Linus tree. You currently need gcc 2.96 or higher to build
the 2.4.x kernel.

> rwsem.o(.text+0x1d3): undefined reference to `__builtin_expect'
> /usr/src/linux-2.4.3-ac12/lib/lib.a(rwsem.o): In function
> `rwsem_up_read_wake':
> rwsem.o(.text+0x2ed): undefined reference to `__builtin_expect'
> /usr/src/linux-2.4.3-ac12/lib/lib.a(rwsem.o): In function
> `rwsem_up_write_wake':rwsem.o(.text+0x3c6): undefined reference to
> `__builtin_expect'

Add a

#define __builtin_expect

at the top of the rwsem code that uses this and let me know if its happy then.
If so I'll figure out the write gcc version checks