# llvmgcc20/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. The source tarball used by this package was created based on "git" upstream sources. The sources were obtained as follows: ocgitfetch --run \ --checkout=llvmorg-20.1.0 \ --deletegit \ https://github.com/llvm/llvm-project.git #--------------------------------------------------------------------- 2. If you'd like to build this package on a 32-bit system -- as oppos- ed to cross-compiling it for the same system -- you'll probably need to set up a large amount of swap space, 16GB or more, or the build may lock up the system. #--------------------------------------------------------------------- 3. This package builds "clang" and "clang++" compilers that work well enough to build the parts of "xorg" and most other packages that re- quire "clang*". The compilers are built using "gcc" and linked against "gcc" librar- ies, so they aren't self-hosted. #--------------------------------------------------------------------- [buildtimes] #--------------------------------------------------------------------- [settings] altpkg = yes configure = none license = See "license*.txt" in installed tree licfile = llvm/LICENSE.TXT nosyslinks = yes purge = yes unpack = relaxed setpaths = libedit libicu libxml2 ncurses python3 zlib zstd #--------------------------------------------------------------------- [depends] actools bzip2 cmake:forward doxygen:forward findutils git:forward grep groff groff-full:forward gv:forward gzip infozip libedit libffi libicu libxml2:forward lndir ncurses ocaml:forward perl python:forward tcltk:forward valgrind:forward zlib #--------------------------------------------------------------------- [build] MANBASE=$PKGDIR_PROD/man mkdir -p $MANBASE rm -fr flang tools/flang rm -fr libclc tools/libclc rm -fr lld tools/lld rm -fr lldb tools/lldb #--------------------------------------------------------------------- BUILD32= if [ "@$LACARCH" == "@glibc32" ]; then M=`uname -m` if [ "@$M" == "@x86_64" ]; then BUILD32="-DLLVM_BUILD_32_BITS=ON" fi fi export BUILD32=$BUILD32 echo export BUILD32=$BUILD32 #--------------------------------------------------------------------- export TOPDIR=`pwd` export PKGDIR_PROD=$PKGDIR_PROD export PKGDIR_SPECIAL=$PKGDIR_SPECIAL export BINDIR=$PKGDIR_PROD/bin export INCDIR=$PKGDIR_PROD/include export OLDINC=/$LACARCH/pkg/glibc/include export LACINCDIRS=$INCDIR:$PRODTREE/libicu/include export PATH=$BINDIR:$PATH echo export TOPDIR=$TOPDIR echo export PKGDIR_PROD=$PKGDIR_PROD echo export PKGDIR_SPECIAL=$PKGDIR_SPECIAL echo export BINDIR=$BINDIR echo export INCDIR=$INCDIR echo export OLDINC=$OLDINC echo export LACINCDIRS=$LACINCDIRS echo 'export PATH=$BINDIR:$PATH' #--------------------------------------------------------------------- export LACARCHBUILD=$LACARCHBUILD export LACDONTFIND="libffi,libunwind,llvm,llvmself" export LACFIXLECHROM=yes export LACSMPERRORPAUSE=1 export LACSMPTRIES=2 export USECCACHE=yes echo export CCPAUSE=$CCPAUSE echo export LACARCHBUILD=$LACARCHBUILD echo export LACDONTFIND="$LACDONTFIND" echo export LACFIXLECHROM=yes echo export LACSLOWDOWN=$LACSLOWDOWN echo export LACSMPERRORPAUSE=$LACSMPERRORPAUSE echo export LACSMPEXTRANICE=$LACSMPEXTRANICE echo export LACSMPTRIES=$LACSMPTRIES echo export USECCACHE=$USECCACHE #--------------------------------------------------------------------- mkdir -p $BINDIR $INCDIR #--------------------------------------------------------------------- hash gcc g++ export CLANG_EXE=`which gcc` export CLANGPP_EXE=`which g++` export LACLLVMBOOT=no export LACSTATICCXX=no #--------------------------------------------------------------------- cd $TOPDIR || exit 1 rm -fr build || exit 1 mkdir build || exit 1 cd build || exit 1 echo `date` clang cmake start export CMAKE_PREFIX_PATH=$PRODTREE/python3 CC=$CLANG_EXE CXX=$CLANGPP_EXE \ cmake -DCMAKE_INSTALL_PREFIX=$PKGDIR_PROD \ -DCMAKE_INSTALL_OLDINCLUDEDIR=$OLDINC \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER=$CLANG_EXE \ -DCMAKE_CXX_COMPILER=$CLANGPP_EXE \ \ -DCLANG_DEFAULT_CXX_STDLIB=libstdc++ \ -DCLANG_DEFAULT_RTLIB=libgcc \ -DLIBCXX_CXX_ABI=libstdc++ \ -DLLVM_DEFAULT_TARGET_TRIPLE=$LACARCHBUILD \ -DLLVM_ENABLE_LIBCXX=OFF \ -DLLVM_TARGETS_TO_BUILD="host;AMDGPU" \ -DLLVM_ENABLE_PROJECTS="clang" \ \ -DHAVE_CXX_ATOMICS64_WITHOUT_LIB=ON \ -DHAVE_CXX_ATOMICS_WITHOUT_LIB=ON \ \ -DUSE_DEPRECATED_GCC_INSTALL_PREFIX=ON \ -DGCC_INSTALL_PREFIX=$PRODTREE/gcc \ -DLINK_POLLY_INTO_TOOLS=ON \ -DWITH_POLLY=ON \ $BUILD32 \ -Wno-dev \ ../llvm || exit 1 echo `date` clang cmake end #--------------------------------------------------------------------- echo `date` clang build start smpmake smpmake install echo `date` clang build end #--------------------------------------------------------------------- echo `date` clang wrapper start cd $BINDIR cp -p $PKGDIR_SPECIAL/wrap*.txt . chmod 755 wrap*.txt sed -e 's@\(.*ENV.*LACLLVMSELF.*=\).*@\n\1 "llvmself";@' \ -i wrapclang.txt for x in clang clang++ do trueifexe $x && mv $x $x.bin touch $x rm $x cp -p wrapclang.txt $x done rm wrapclang.txt sed -e "s@\(.*ENV.*'CLANGC'.*=\).*@\n\1 'yes';@" \ -i clang #--------------------------------------------------------------------- pushd $PKGDIR_PROD rm -fr xbin mkdir xbin cd xbin cp -a $PKGDIR_SPECIAL/xbin/* . chmod 755 * popd echo `date` clang wrapper end #--------------------------------------------------------------------- DIR=$PRODTREE/xorg/lib mkdir -p $DIR cd $DIR rm -fr lib*clang*.a rm -fr lib*LLVM*.a ln -nsf $PKGDIR_PROD/lib/*.a . #--------------------------------------------------------------------- cd $TOPDIR echo `date` Done #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = Not clear url_home = http://llvm.org/ url_lfs = Not checked yet url_tarball = git # See "technotes" in "cfg" file #--------------------------------------------------------------------- [history] 250306 Added package. Started with 20.1.0.