From: Manuel L. <ma...@ro...> - 2007-03-19 08:28:05
|
Hello, When I build linux with GCC-4.x and enable CONFIG_CC_OPTIMIZE_FOR_SIZE linking fails with this error: LD .tmp_vmlinux1 kernel/built-in.o: In function '__cmpxchg_called_with_bad_pointer' make[1]: *** [.tmp_vmlinux1] Error 1 make: *** [_all] Error 2 I tracked it to kernel/rtmutex.c, line 88: #define rt_mutex_cmpxchg(l,c,n) (cmpxchg(&l->owner, c, n) == c) Apparently the "size" input value passed to cmpxchg is neither 4, 2 or 1 (tried a few others too but not sizeof(struct task_struct)). Probably a compiler bug? (gcc-4.1.2, Gentoo) Also, these exports need to be removed from sh_ksyms.c, they give "undefined reference" errors: __sdivsi3_i4i __udiv_qrnnd_16 __udivsi3_i4i Kernel boots ok otherwise. Thanks, -- Manuel Lauss |