编译gcc-10.4.0/clang(llvm)

编译安装GCC-10.4.0 前置条件

编译安装GCC-10.4.0 前置条件

下载 gcc源码 http://mirror.linux-ia64.org/gnu/gcc/releases/gcc-10.4.0/gcc-10.4.0.tar.gz

gmp-6.2.0 mpc-1.1.0 mpfr-4.0.2 isl-0.24 Anaconda-3.8.8

 

命令:

# centos6
cd gcc-10.4.0
mkdir objdir
cd objdir
setenv LD_LIBRAYR_PATH /export/opt/gmp-6.2.0/lib:/export/opt/mpc-1.1.0/lib:/export/opt/mpfr-4.0.2/lib:/export/opt/isl-0.24/lib:/tool/opt/Anaconda-1.9/lib:$LD_LIBRARY_PATH
../configure --prefix=/export/opt/gcc-10.4.0 --with-gmp=/export/opt/gmp-6.2.0 --with-mpc=/export/opt/mpc-1.1.0 --with=mpfr=/export/opt/mpfr-4.0.2 --with-isl=/export/opt/isl-0.24 --with-isl-include=/export/opt/isl-0.24/include --with-isl-lib=/export/opt/isl-0.24/lib
make -j8
make install
# centos7
cd gcc-10.4.0
mkdir objdir
cd objdir
setenv LD_LIBRAYR_PATH /export/opt/gmp-6.2.0/lib:/export/opt/mpc-1.1.0/lib:/export/opt/mpfr-4.0.2/lib:/export/opt/isl-0.24/lib:/tool/opt/Anaconda-3.8.8/lib:$LD_LIBRARY_PATH
../configure --prefix=/export/opt/gcc-10.4.0 --with-gmp=/export/opt/gmp-6.2.0 --with-mpc=/export/opt/mpc-1.1.0 --with=mpfr=/export/opt/mpfr-4.0.2 --with-isl=/export/opt/isl-0.24 --with-isl-include=/export/opt/isl-0.24/include --with-isl-lib=/export/opt/isl-0.24/lib --disable-multilib
make -j8
make install

编译安装llvm-16.0.0 前置条件

1. 下载llvm-project source code https://codeload.github.com/llvm/llvm-project/tar.gz/refs/tags/llvmorg-16.0.0

2. cmake >= 3.13.4 python>=3.6 gcc>=7.1

# centos6
cd llvm-project
mkdir build
cd build
setenv PATH /export/opt/cmake-3.19.8/bin:/export/opt/Anaconda-3.8.8/bin:/export/opt/binutils-2.28/bin:$PATH
setenv LD_LIBRAYR_PATH /export/opt/gmp-6.2.0/lib:/export/opt/mpc-1.1.0/lib:/export/opt/mpfr-4.0.2/lib:/export/opt/isl-0.24/lib:$LD_LIBRARY_PATH
cmake -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/export/opt/llvm-16.0.0 -G "Unix Makefiles" ../llvm
make -j`lscpu|grep '^CPU(s)'|awk '{print $2}'`
make install
# centos7
cd llvm-project
mkdir build
cd build
setenv PATH /export/opt/cmake-3.19.8/bin:/export/opt/Anaconda-3.8.8/bin:$PATH
cmake -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/export/opt/llvm-16.0.0 -G "Unix Makefiles" ../llvm
make -j`lscpu|grep '^CPU(s)'|awk '{print $2}'`
make install
0 0 投票数
文章评分
订阅评论
提醒
guest
0 评论
内联反馈
查看所有评论