Configuring the BiSheng Compiler Environment
Procedure
- Use PuTTY to log in to the server as the root user.
- Download the BiSheng Compiler software package and upload it to the target server.
- Create an installation directory (/opt/aarch64/compiler is used as an example):
mkdir –p /opt/aarch64/compiler
- Copy the BiSheng Compiler software package to the installation directory.
cp bisheng-compiler-2.1.0-aarch64-linux.tar.gz/opt/aarch64/compiler
- Decompress the BiSheng Compiler software package.
tar –zxvf bisheng-compiler-2.1.0-aarch64-linux.tar.gz
- Set the environment variables of the compiler.
export PATH=/opt/aarch64/compiler/bisheng-compiler-2.1.0-aarch64-linux/bin:$PATH export INCLUDE=/opt/aarch64/compiler/bisheng-compiler-2.1.0-aarch64-linux/include:$INCLUDE export LD_LIBRARY_PATH=/opt/aarch64/compiler/bisheng-compiler-2.1.0-aarch64-linux/lib64:$LD_LIBRARY_PATH
- (Optional) Clear the hash table in the current window.
If another version of LLVM compiler exists in the system, run the following command immediately after installing the BiSheng Compiler to prevent the clang command from being captured by the hash algorithm. If the clang command is captured by the hash algorithm, the BiSheng Compiler or the open-source LLVM compiler cannot be used.
hash -r
- Check the BiSheng Compiler version.
clang -v
If the command output contains the BiSheng Compiler version information, the installation is successful.
Parent topic: Configuring the Compilation Environment