arm-linux-gcc-4.5.1 installation method

EDITORIAL

Prior wrote an arm-linux-gcc-5.4.0 installation method, but later found that there may be some version 5.4.0 this is so new, so they find the 4.5.1 version (low version) by FriendlyARM (Friendly the arm) provided below is specific installation steps.

installation steps

Download arm-linux-gcc-4.5.1 installation package

Baidu cloud here is a link:

Links: https://pan.baidu.com/s/1e40tMS4lme1H9A6KF9ylpQ extraction code: See comments on this section

Decompression

It is best to use the / usr / local / next create a new folder / arm, then put the installation package extract to / arm, to remember extracting this path, after adding environment variables. Codecs with the following commands
sudo tar -zxvf arm-linux-gcc -4.5.1 ... .tgz -C / usr / local / arm /

After unpacking will find in / usr / local / arm path have / opt folder a, / opt folder inside nested within the layers of folders, the path is very long and hard to remember and use, may wish to remove several layers path, leaving only /4.5.1 this layer. Will then be copied to the folder /4.5.1 / usr / local / arm under
sudo cp -r /4.5.1 / usr / local / arm

In this case, the / opt Delete under / usr / local / arm, retaining only the useful /4.5.1 can, thus, the path of the compiler installation package is /usr/local/arm/4.5.1

Add environment variables
sudo vi / etc / environment

At the end, add the following sentence
: usr / local / arm / 4.5.1 / bin /

Update
source / etc / environment

Then add the following sentence to see if the success of
echo $ PATH

Add Library

So far, even with the addition and update the environment variable, not necessarily normal use. Because at this time and still there is a certain relationship between the x86, x86 must also use some libraries provided in order to allow the cross compiler running. To run the cross compiler, there must be support for 32-bit libraries, however, 64-bit machine default is no 32-bit libraries, so you want to add 32-bit libraries on 64-bit machines. Add this with the following two statements
sudo APT-GET install libc6: i386
sudo APT-GET install lib32z1

Check whether the installation was successful
arm-linux-gcc -v

Guess you like

Origin www.linuxidc.com/Linux/2020-01/161954.htm