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?
-
I guess I have to supply some --target=elf-arm or something similar. Trying commands form official website and fighting error messages at the moment. – Atilla Filiz Dec 04 '08 at 09:30
3 Answers
Here are the default commands/parameters used to build the binary packages. Download the sources, unpack and issue them:
- cd [binutils-build]
- [binutils-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
- make all install
- export PATH="$PATH:[toolchain-prefix]/bin"
- cd [gcc-build]
- [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
- make all-gcc install-gcc
- cd [newlib-build]
- [newlib-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
- make all install
- cd [gcc-build]
- make all install
- cd [gdb-build]
- [gdb-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
- 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/bug-binutils@gnu.org/msg06475.html
I could not build insight but i guess it is possible to debug it with something else.

- 2,383
- 8
- 29
- 47
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.

- 9,445
- 7
- 36
- 51
- Download the sources available under "Files"
- Unpack them
Go to each unpacked directory and type:
./configure --help
to get the available options, then run
./configure [options]
make
make check
make install

- 19,717
- 4
- 46
- 69
-
configuration must be made with some custom options, like specifying final target. – Atilla Filiz Dec 04 '08 at 09:30
-
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 Dec 04 '08 at 19:01
-
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 Dec 06 '08 at 02:01