Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
compiling kernel 2.6.18 fails: -m64 not supported[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Sun Oct 22, 2006 4:11 pm    Post subject: compiling kernel 2.6.18 fails: -m64 not supported[SOLVED] Reply with quote

Hi,

I was trying to compile kernel 2.6.18 to finally get sound on my G5, but I get these errors:

Code:
 make
:0: error: -m64 not supported in this configuration
:0: error: -m64 not supported in this configuration
/usr/src/linux-2.6.18-gentoo-r1/scripts/gcc-version.sh: line 13: printf: #: invalid number
/usr/src/linux-2.6.18-gentoo-r1/scripts/gcc-version.sh: line 13: printf: #: invalid number
/bin/sh: line 0: [: too many arguments
:0: error: -m64 not supported in this configuration
:0: error: -m64 not supported in this configuration
/usr/src/linux-2.6.18-gentoo-r1/scripts/gcc-version.sh: line 13: printf: #: invalid number
/usr/src/linux-2.6.18-gentoo-r1/scripts/gcc-version.sh: line 13: printf: #: invalid number
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  CC      arch/powerpc/kernel/asm-offsets.s
arch/powerpc/kernel/asm-offsets.c:1: error: -m64 not supported in this configuration
make[1]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2


Here's my gcc:
Code:
gcc-config -l
 [1] powerpc-unknown-linux-gnu-4.1.1 *


I'm on ppc64 with 32 bit userland:
Code:
ls -al /etc/make.profil*
lrwxrwxrwx 1 root root 76 Jul 14 13:23 /etc/make.profile -> /usr/portage/profiles/default-linux/ppc/ppc64/2006.1/32bit-userland/970/pmac


Any clues? Thanks

Thomas


Last edited by pindar on Sun Oct 22, 2006 5:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
jaeger63
n00b
n00b


Joined: 08 Apr 2006
Posts: 38
Location: Gatineau, Quebec

PostPosted: Sun Oct 22, 2006 4:45 pm    Post subject: Reply with quote

You have to edit the CROSS-COMPILE line in the makefile to compile the kernel from a 32-bit Userland:

Code:
Important: In case you are in 32-bit userland, you must edit the top
level Makefile in /usr/src/linux and change the CROSS_COMPILE option to
CROSS_COMPILE ?= powerpc64-unknown-linux-gnu-. You must do this before you run
make menuconfig or it may result in kernel compilation problems.


It's in the fine print in Chapter 7 of the handbook:
http://www.gentoo.org/doc/en/handbook/handbook-ppc64.xml?part=1&chap=7
Back to top
View user's profile Send private message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Sun Oct 22, 2006 5:26 pm    Post subject: Reply with quote

jaeger63 wrote:
You have to edit the CROSS-COMPILE line in the makefile to compile the kernel from a 32-bit Userland:

Code:
Important: In case you are in 32-bit userland, you must edit the top
level Makefile in /usr/src/linux and change the CROSS_COMPILE option to
CROSS_COMPILE ?= powerpc64-unknown-linux-gnu-. You must do this before you run
make menuconfig or it may result in kernel compilation problems.


It's in the fine print in Chapter 7 of the handbook:
http://www.gentoo.org/doc/en/handbook/handbook-ppc64.xml?part=1&chap=7


Thanks for being generous and saying it's in the "fine print." Now I remember I had to do this last time, too! Works now wonderfully, thanks a lot!

Thomas
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum