GCC安装步骤

GCC安装步骤:

第一步:解压GCC到根目录下
tar -xvzf arm-linux-gcc-4.3.2.tgz -C /
第二步:打开profile文件
vi /etc/profile

第三步:修改profile,找到以下
# Path manipulation
if [ "$EUID" = "0" ]; then

        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi

在if 和fi中添加如下
pathnunge /usr/local/arm/4.3.2/bin

即修改成以下:
# Path manipulation
if [ "$EUID" = "0" ]; then
        pathmunge /usr/local/arm/4.3.2/bin
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi

第四步:修改后保存文件,即输入 “ :wq ”回车就可以了。 
 
第五步:更新环境变量
source /etc/profile

第六步:查看是否安装成功
 arm-linux-gcc -v
若有以下信息说明安装成功了:
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/lite-respin/linux/src/gcc-4.3/configure –build=i686-pc-linux-gnu –host=i686

-pc-linux-gnu –target=arm-none-linux-gnueabi –enable-threads –disable-libmudflap –disable-libssp –disable

-libstdcxx-pch –with-gnu-as –with-gnu-ld –enable-languages=c,c++ –enable-shared –enable-symvers=gnu —

enable-__cxa_atexit –with-pkgversion='Sourcery G++ Lite 2008q3-72' –with-

bugurl=https://support.codesourcery.com/GNUToolchain/ –disable-nls –prefix=/opt/codesourcery –with-

sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc –with-build-sysroot=/scratch/julian/lite-

respin/linux/install/arm-none-linux-gnueabi/libc –with-gmp=/scratch/julian/lite-respin/linux/obj/host-libs-

2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr –with-mpfr=/scratch/julian/lite-respin/linux/obj/host-

libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr –disable-libgomp –enable-poison-system-

directories –with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin —

with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.2 Sourcery G++ Lite 2008q3-72)

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注