Re: 2.5.44-mm5

From: Dipankar Sarma (dipankar@in.ibm.com)
Date: Fri Oct 25 2002 - 07:39:21 EST


On Fri, Oct 25, 2002 at 12:04:22PM +0000, Con Kolivas wrote:
>
> Compile failure (gcc3.2):
>
> gcc -Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe
> -mpreferred-stack-boundary=2 -march=i686 -Iarch/i386/mach-generic
> -fomit-frame-pointer -nostdinc -iwithprefix include -DKBUILD_BASENAME=version
> -c -o init/version.o init/version.c
> ld -m elf_i386 -r -o init/built-in.o init/main.o init/version.o init/do_mounts.o
> ld -m elf_i386 -e stext -T arch/i386/vmlinux.lds.s
> arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/built-in.o
> --start-group arch/i386/kernel/built-in.o arch/i386/mm/built-in.o
> arch/i386/mach-generic/built-in.o kernel/built-in.o mm/built-in.o
> fs/built-in.o ipc/built-in.o security/built-in.o lib/lib.a
> arch/i386/lib/lib.a drivers/built-in.o sound/built-in.o
> arch/i386/pci/built-in.o arch/i386/oprofile/built-in.o net/built-in.o
> --end-group -o .tmp_vmlinux1
> kernel/built-in.o: In function `sched_init':
> kernel/built-in.o(.init.text+0xc4): undefined reference to `init_kstat'
> make: *** [.tmp_vmlinux1] Error 1

The patch below should fix your problem, hopefully. Although I
don't understand why kstat initialization isn't in common code.
I will try to fix it the right way later.

Thanks

-- 
Dipankar Sarma  <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

diff -urN linux-2.5.44-mm5/kernel/sched.c linux-2.5.44-mm5-fix/kernel/sched.c --- linux-2.5.44-mm5/kernel/sched.c Fri Oct 25 15:11:06 2002 +++ linux-2.5.44-mm5-fix/kernel/sched.c Fri Oct 25 15:40:01 2002 @@ -2160,6 +2160,8 @@ * Don't use in new code. */ spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; +#else +static inline void init_kstat(void) { } #endif void __init sched_init(void)

- 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 : Thu Oct 31 2002 - 22:00:27 EST