安装了交叉编译工具,在/etc/profile下添加了环境变量
export PATH=/usr/local/arm/linux-devkit/bin:$PATH
使用which arm-arago-linux-gnueabi-gcc
/usr/local/arm/linux-devkit/bin/arm-arago-linux-gnueabi-gcc
arm-arago-linux-gnueabi-gcc -v 也有显示:
Using built-in specs.
COLLECT_GCC=arm-arago-linux-gnueabi-gcc
Target: arm-arago-linux-gnueabi
Configured with: /sim/scratch_a0850442/arago-tmp-arago/work/i686-armv7a-sdk-arago-linux-gnueabi/gcc-cross-sdk-4.5-r41.2+svnr170880/gcc-4_5-branch/configure --build=i686-linux --host=i686-linux --target=arm-arago-linux-gnueabi --prefix=/arago-2011.09/armv7a --exec_prefix=/arago-2011.09/armv7a --bindir=/arago-2011.09/armv7a/bin --sbindir=/arago-2011.09/armv7a/bin --libexecdir=/arago-2011.09/armv7a/libexec --datadir=/arago-2011.09/armv7a/share --sysconfdir=/arago-2011.09/armv7a/etc --sharedstatedir=/arago-2011.09/armv7a/share/com --localstatedir=/arago-2011.09/armv7a/var --libdir=/arago-2011.09/armv7a/lib --includedir=/arago-2011.09/armv7a/include --oldincludedir=/arago-2011.09/armv7a/include --infodir=/arago-2011.09/armv7a/share/info --mandir=/arago-2011.09/armv7a/share/man --enable-largefile --disable-nls --enable-ipv6 --with-gnu-ld --enable-shared --enable-languages=c,c++,objc,fortran --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-arago-linux-gnueabi- --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap --with-float=softfp --with-sysroot=/arago-2011.09/armv7a/arm-arago-linux-gnueabi --with-build-time-tools=/sim/scratch_a0850442/arago-tmp-arago/sysroots/i686-linux/usr/armv7a/arm-arago-linux-gnueabi/bin --with-build-sysroot=/sim/scratch_a0850442/arago-tmp-arago/sysroots/armv7a-arago-linux-gnueabi --disable-libunwind-exceptions --with-mpfr=/sim/scratch_a0850442/arago-tmp-arago/sysroots/i686-linux/usr --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 4.5.3 20110311 (prerelease) (GCC)
但编译时总是提示
/bin/bash: arm-arago-linux-gnueabi-gcc: 未找到命令
/bin/bash: arm-arago-linux-gnueabi-gcc: 未找到命令
在线求解 |