1. For example, 4.3.2 version of the compiler
Place the arm-linux-gcc-4.3.2.tar.bz2 in the/work directory
Unzip:
sudo tar jxvf/work/arm-linux-gcc-4.3.2.tar.bz2-c/
To add an environment variable:
sudo vi/etc/environment
Comment out the existing environment variables
#PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/work/tools/ Gcc-3.4.5-glibc-2.3.6/bin "
Add a new environment variable and save
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/arm/4.3.2/bin/ "
Make effective
source/etc/environment Check if successful
[Email protected]:/usr/local/arm/4.3.2/bin$ 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)
2. Replace the 3.4.5 version of the compiler
Place the arm-linux-gcc-3.4.5-glibc-2.3.6.tar.bz2 in the/work directory
Unzip
sudo tar jxvf/work/arm-linux-gcc-3.4.5-glibc-2.3.6.tar.bz2-c/
Changing environment variables
sudo vi/etc/environment
Comment out the original environment variable and add the new environment variable
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/gcc-3.4.5-glibc-2.3.6/bin"
Make effective
Source/etc/environment
Check if successful
[Email protected]:/gcc-3.4.5-glibc-2.3.6/bin$ arm-linux-gcc-v
Reading Specs from/gcc-3.4.5-glibc-2.3.6/bin/. /lib/gcc/arm-linux/3.4.5/specs
Configured with:/work/tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-3.4.5/ Configure--target=arm-linux--host=i686-host_pc-linux-gnu--prefix=/work/tools/gcc-3.4.5-glibc-2.3.6--with-float =soft--with-headers=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/include--with-local-prefix=/work/tools/ Gcc-3.4.5-glibc-2.3.6/arm-linux--disable-nls--enable-threads=posix--enable-symvers=gnu--enable-__cxa_atexit-- enable-languages=c,c++--enable-shared--enable-c99--enable-long-long
Thread Model:posix
gcc version 3.4.5
Replace compiler (reprint)