views:

855

answers:

3

I want to build a toolchain from gnuarm.org from sources. I don't want to use binary version because i'm running x64 linux. Can you point me to some kind of tutorial?

A: 
  1. Download the sources available under "Files"
  2. Unpack them
  3. Go to each unpacked directory and type:

    ./configure --help

    to get the available options, then run

    ./configure [options]

    make

    make check

    make install

Max Lybbert
configuration must be made with some custom options, like specifying final target.
Atilla Filiz
Which is why you type "./configure --help" to find out those options. There's no way I can magically divine which of all the options the OP will want, so he'll have to do some digging on his own.
Max Lybbert
Wow, people don't like this answer, although it looks a lot like the OP's final solution (blue). Did I come off as rude saying that ./configure has a --help option?
Max Lybbert
+2  A: 

Here are the default commands/parameters used to build the binary packages. Download the sources, unpack and issue them:

  1. cd [binutils-build]
  2. [binutils-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
  3. make all install
  4. export PATH="$PATH:[toolchain-prefix]/bin"
  5. cd [gcc-build]
  6. [gcc-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft --enable-languages="c,c++" --with-newlib --with-headers=[newlib-source]/newlib/libc/include
  7. make all-gcc install-gcc
  8. cd [newlib-build]
  9. [newlib-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
    1. make all install
    2. cd [gcc-build]
    3. make all install
    4. cd [gdb-build]
    5. [gdb-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
    6. make all install

lines 11-12 seem to have no effect. Using gcc < 4.x is not advised, and building binutils can give the following error:

../../binutils-2.19/gas/config/tc-arm.c: In function 's_arm_unwind_save_mmxwr': ../../binutils-2.19/gas/config/tc-arm.c:3459: error: format not a string literal and no format arguments

the solution is easy, just add "%s" as the FIRST parameter to the lines with error as the patch here suggests: http://www.mail-archive.com/[email protected]/msg06475.html

I could not build insight but i guess it is possible to debug it with something else.

Atilla Filiz
+1  A: 

You need to install libx11-dev to compile Insight.

sudo apt-get install libx11-dev

Besides that, your own answer works just fine.

Edit: Oh, and you might miss termcap as well, get it here: GNU Termcap

Edit2: Configure seems to be tight-ass about ignoring return values "*'xxx', declared with attribute warn_unused_result*", so you might need to modify the options or about 12 instances to catch return values to get clean build.

Tuminoid