arm-none-eabi-gcc toolchain is not working

时间:2016-06-07 12:24:29

标签: gcc arm cross-compiling toolchain

I have downloaded the toolchain from following link

https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q1-update/+download/gcc-arm-none-eabi-5_3-2016q1-20160330-linux.tar.bz2

在ng-grid中显示数据

我制作了一个脚本,将其添加到环境路径

export INSTALL_ROOT=`pwd`
TOOLS_PATH=$INSTALL_ROOT/
CROSS_PATH=$TOOLS_PATH/arm-none-eabi/bin
export PATH=$TOOLS_PATH/bin:$CROSS_PATH:$PATH

# Path to cross-tools
export CROSS_COMPILE=arm-none-eabi-
export CROSS_COMPILE_APPS=arm-none-eabi-

但如果我在交叉编译中使用它,即使用./configure --error来

./configure --host=arm-none-eabi
checking build system type... i686-pc-linux-gnu
checking host system type... arm-none-eabi
checking target system type... arm-none-eabi
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking whether the C compiler works... no
aconfigure: error: in `/home/sameer/Downloads/pjsip_experiment/0706/pjproject-2.4.5':
aconfigure: error: C compiler cannot create executables
See `config.log' for more details

如果我只是编译一个helloworld程序,那么也会出现错误

arm-none-eabi-gcc hello.c -o out

/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text._write_r+0x24): undefined reference to `_write'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text._close_r+0x18): undefined reference to `_close'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text._fstat_r+0x20): undefined reference to `_fstat'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text._isatty_r+0x18): undefined reference to `_isatty'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text._lseek_r+0x24): undefined reference to `_lseek'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text._read_r+0x24): undefined reference to `_read'
collect2: error: ld returned 1 exit status
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text._write_r+0x24): undefined reference to `_write'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text._close_r+0x18): undefined reference to `_close'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text._fstat_r+0x20): undefined reference to `_fstat'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text._isatty_r+0x18): undefined reference to `_isatty'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text._lseek_r+0x24): undefined reference to `_lseek'
/home/sameer/Downloads/toolchain/gcc-arm-none-eabi-5_3-2016q1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text._read_r+0x24): undefined reference to `_read'
collect2: error: ld returned 1 exit status

有什么问题?

0 个答案:

没有答案