Building Gnuarm toolchain from source

假装没事ソ 提交于 2019-12-23 01:42:08

问题


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?


回答1:


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.




回答2:


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/bug-binutils@gnu.org/msg06475.html

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




回答3:


  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



来源:https://stackoverflow.com/questions/338559/building-gnuarm-toolchain-from-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!