我要评分
获取效率
正确性
完整性
易理解

Configuring the GCC for openEuler Compilation Environment

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Download the GCC for openEuler software package and upload it to the target server.
  3. Create an installation directory (/opt/aarch64/KPGCC is used as an example):
    mkdir –p /opt/aarch64/KPGCC
  4. 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
  5. Decompress the GCC for openEuler software package.
    tar -zxvf gcc-9.3.1-2021.09-aarch64-linux.tar.gz
  6. 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
  7. Verify the GCC for openEuler version.
    gcc -v

    If the command output contains the GCC for openEuler version information, the installation is successful.