Configuring the GCC for openEuler Compilation Environment
Procedure
- Use PuTTY to log in to the server as the root user.
- Download the GCC for openEuler software package and upload it to the target server.
- Create an installation directory (/opt/aarch64/KPGCC is used as an example):
mkdir –p /opt/aarch64/KPGCC
- Copy the GCC for openEuler software package to the installation directory.
cp -rf gcc-9.3.1-2021.09-aarch64-linux.tar.gz /opt/aarch64/KPGCC
- Decompress the GCC for openEuler software package.
tar -zxvf gcc-9.3.1-2021.09-aarch64-linux.tar.gz
- Set the environment variables of the compiler.
export PATH=/opt/aarch64/KPGCC/gcc-9.3.1-2021.09-aarch64-linux/bin:$PATH export INCLUDE=/opt/aarch64/KPGCC/gcc-9.3.1-2021.09-aarch64-linux/include:$INCLUDE export LD_LIBRARY_PATH=/opt/aarch64/KPGCC/gcc-9.3.1-2021.09-aarch64-linux/lib64:$LD_LIBRARY_PATH
- Verify the GCC for openEuler version.
gcc -v
If the command output contains the GCC for openEuler version information, the installation is successful.
Parent topic: Configuring the Compilation Environment