I imagine a lot of you gcc people will laugh at me now,
but I finally bought amd64 machine and want
to compile 64-bit Linux kernel.

I am not able to do it. Tracked it down to a simple thing.
My gcc cannot compile any .c file with -m64 flag:

# gcc -m64 -c t.c
t.c:1: sorry, unimplemented: 64-bit mode not compiled in

I tried rebuilding my gcc for i686-pc-linux-gnu (was 486-... before),
doesn't change anything.

I looked in the source. i386.c:

  if ((TARGET_64BIT != 0) != ((target_flags & MASK_64BIT) != 0)) 
    sorry ("%i-bit mode not compiled in", 
           (target_flags & MASK_64BIT) ? 64 : 32); 

does it mean I need a cross-compiler (to x86_64) to use -m64?
It's strange because then -m64 is not useful at all
- x86_64 cross compiler defaults to 64 bit anyway... right?

I also tried to find answer using google,
but to my surprise google did not immediately gave me
lots of links on "how to build x86_64 kernel on i386".

That's why I'm wasting your time by asking on a gcc ml.

An URL or googleable search string will suffice. Thank you.
--
vda

Reply via email to