Subject: Re: kernels built with "-march=..." hang?
To: John D. Baker <jdbaker@mylinuxisp.com>
From: Wojciech Puchar <wojtek@tensor.3miasto.net>
List: port-i386
Date: 11/07/2005 21:18:15
>
> When I build a kernel with any CPU-specific optimization flags
> (-march=pentium-mmx, -march=pentium or even just -mcpu=pentium-mmx,
> -mcpu=pentium which should produce i386-compatible code), the resulting
> kernel hangs immediately upon loading.
>
> As long as the kernel is built with no cpu-optimizations, it boots and
> runs just fine, although probably non-optimally.

more fun - with -march=pentiumpro or pentium2 or pentium3 or pentium4 or 
i386 - works just fine.

just with pentium crashes.


can you try to narrow this problem this way:

a) compile kernel with -march=i386
b) move all .o files somewhere say to /root/o-i386
c) compile kernel with -march=pentium with ALL other config options 
untouched.
d) copy all .o files say to /root/o-pentium

e) try brute-force halving. as it's about 500 .o files in kernel build 
directory, you should in 9 tries narrow the problem to exactly one file.
then - problem will be easy to fix.


to clear out phase e:

each try - copy all files from /root/o-i386 to kernel build directory, and 
then overwrite some files you want to test (1/2 of all at first time) 
from o-pentium, then do make (should just link) and try the kernel.

if it hangs - you narrowed the problem to 1/2 of files, halve the list 
again
if it works - you narrowed the problem to second 1/2 of files, halve that 
list.


with mc with filelist sorting should be easy.


i'm sure you will end with exactly one file causing the problem.
then please sent-pr to get a fix and post too to get a quick fix.