Dear All,
I could port libc++ 14.0 on Aurora by using NEC C/C++ compiler version 4.0.0.
Usage:
You can use libc++ by the following way.
% nc++-4.0.0 -nonccinc -mlibcxxdir="install-directory" ....
- I have not tried "make check" but I could get equal to or better than result of "clang++ -stdlib=libc++" in PlumHall C++ testsuite.
Required software:
- NEC C/C++ compiler version 4.0.0 or higher.
- Cmake version 3.13.4 or higher.
Build and installation:
Please refer to the following procedure after you download the file libc++-14.ve.tgz.
Assume that;
- The install directory is "/home/libcxx".
- The directory where you make a clone of llvm-project is "/home/llvm-project".
1) Get a clone of llvm-project
% pwd
/home
% git clone https://github.com/llvm/llvm-project.git -b release/14.x
% cd /home/llvm-project
% tar zxvf libc++-14.ve.tgz (This is the attached file of this topic)
libcxx-14.ve.diff
pstl-14.ve.diff
build/
build/cmake.sh
build_pstl/
build_pstl/cmake.sh
3) Patching libc++ and pstl
% cd /home/llvm-project
% cp -r libcxx libcxx.orig
% cp -r pstl pstl.orig
% patch -p0 < libcxx-14.ve.diff
% patch -p0 < pstl-14.ve.diff
4) Prepare install directory
% cd /home/libcxx
% mkdir -p include/c++/v1
% ln -s /opt/nec/ve/ncc/4.0.0/include/*.h include
% ln -s /opt/nec/ve/ncc/4.0.0/include/c++/v1/cxxabi.h include/c++/v1
% ln -s /opt/nec/ve/ncc/4.0.0/include/c++/v1/exception.h include/c++/v1
% ln -s /opt/nec/ve/ncc/4.0.0/include/c++/v1/fstream.h include/c++/v1
% ln -s /opt/nec/ve/ncc/4.0.0/include/c++/v1/iostream.h include/c++/v1
% ln -s /opt/nec/ve/ncc/4.0.0/include/c++/v1/new.h include/c++/v1
% ln -s /opt/nec/ve/ncc/4.0.0/include/c++/v1/stdexcept.h include/c++/v1
% ln -s /opt/nec/ve/ncc/4.0.0/include/c++/v1/typeinfo.h include/c++/v1
5) Build and install pstl
% cd /home/llvm-project/build_pstl
% vi cmake.sh
#!/bin/bash
INSTALL_PREFIX=/home/libcxx (Set your install directory)
LLVMDIR=/home/llvm-project (Set your llvm-project directory)
....
% sh cmake.sh
% make install</nowiki>
6) Build and install libc++
% cd /home/llvm-project/build
% vi cmake.sh
#!/bin/bash
INSTALL_PREFIX=/home/libcxx (Set your install directory)
LLVMDIR=/home/llvm-project (Set your llvm-project directory)
....
% sh cmake.sh
% make
% make install
This completes the installation.
Posted by Y.Kudoh on 12 December 2022 at 05:12. Edited by Y.Kudoh on 12 December 2022 at 05:27. |
|