Re: Trouble compiling MIPS cross-compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Nielsen wrote:

Thanks for all the info! Well, I tried building gcc-3.3.2 with your options and that worked (hooray!) but I couldn't find binutils-2.14.90.0.7, the closest I could see was 2.14 so I used that. It all compiled ok, but now when I go to compile the kernel I get this error:

cc1: error: invalid option `cpu=r3000'

http://www.kernel.org/pub/linux/devel/binutils/


The 2.14.90.0.X series of binutils is a linux-only release maintained by HJ Lu, while the 2.14 version is more or less the official GNU version.

As for the kernel, -mcpu was deprecated in gcc-3.2.x, and totally removed in gcc-3.3.x. You'll want to use the -march option (or -mips[1234] as a synonym), although if you use a recent kernel source tree off linux-mips anoncvs, selecting the right CPU/Machinetype in menuconfig will supply the proper -march/-mipsX commands to the compiler. You'll also want to pass something like this:

make ARCH=mips CROSS_COMPILE=mips-unknown-linux-gnu- <target>

Note: CROSS_COMPILE needs to be set to the CHOST the cross compiler was built with, in my cases, I use the extended CHOST form. The more common form is mips[el]-linux (or mips64[el]-linux)

For 2.4, if you want a mips64 kernel, pass ARCH=mips64. For 2.6, pass ARCH=mips and select 64-bit mode in menuconfig (or oldconfig or xconfig)


--Kumba


--
"Such is oft the course of deeds that move the wheels of the world: small hands do them because they must, while the eyes of the great are elsewhere." --Elrond




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux