Sunday, November 08, 2009

Update on building mips64el cross toolchain

1. git clone git://www.gentoo-cn.org/var/git/loongson.git

2. Don't include loongson overlay's directory directly in your PORTDIR_OVERLAY. But in your own overlay, like /usr/local/portage, create symlinks pointing to sys-devel/ and sys-libs/glibc in loongson overlay. This is because you may not want to install packages from loongson overlay in your host machine. Also you need to make sure your own overlay is the first overlay containing binutils/gcc/glibc in your PORTDIR_OVERLAYS list. You may check the value of this list using command:
portageq envvar PORTDIR_OVERLAY
3. Then, just run crossdev -t mips64el-unknown-linux-gnu. This command installed the following components on my host machine:
  • linux-headers-2.6.27-r2 from portage.
  • binutils-2.19.1-r1 from loongson overlay.
  • gcc-4.4.2 from portage. The gcc in loongson overlay currently is just a symlink to portage gcc.
  • glibc-2.9_p2009042 from loongson overlay. However if you build the toolchain now, glibc-2.10.1 will be installed instead, I just updated it.

3 Comments:

Anonymous Anonymous said...

Ah, thank you for this :) Will go try it at once!

11/08/2009 11:27 PM  
Anonymous Anonymous said...

It works, by the way :) No special tweaking or special versions, just crossdev -t ...

11/10/2009 10:00 PM  
Anonymous Anonymous said...

Ooh, has the glibc-header bug (gentoo bz 235551) been fixed?

11/18/2009 8:55 PM  

Post a Comment

Links to this post:

Create a Link

<< Home