tce-load -i compiletc cmake libxml2-dev ninja python3.11 zstd-dev perl5 wget https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/llvm-19.1.0.src.tar.xz wget https://anduin.linuxfromscratch.org/BLFS/llvm/llvm-cmake-19.src.tar.xz wget https://anduin.linuxfromscratch.org/BLFS/llvm/llvm-third-party-19.src.tar.xz wget https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/clang-19.1.0.src.tar.xz wget https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/compiler-rt-19.1.0.src.tar.xz cd llvm-19.1.0.src tar -xf ../llvm-cmake-19.src.tar.xz tar -xf ../llvm-third-party-19.src.tar.xz sed '/LLVM_COMMON_CMAKE_UTILS/s@../cmake@llvm-cmake-19.src@' -i CMakeLists.txt sed '/LLVM_THIRD_PARTY_DIR/s@../third-party@llvm-third-party-19.src@' -i cmake/modules/HandleLLVMOptions.cmake tar -xf ../clang-19.1.0.src.tar.xz -C tools mv tools/clang-19.1.0.src tools/clang tar -xf ../compiler-rt-19.1.0.src.tar.xz -C projects mv projects/compiler-rt-19.1.0.src projects/compiler-rt grep -rl '#!.*python' | xargs sed -i '1s/python$/python3/' mkdir build cd build CC=gcc CXX=g++ cmake -LAH -DCMAKE_C_FLAGS_RELEASE="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" -DCMAKE_CXX_FLAGS_RELEASE="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" -DCMAKE_INSTALL_PREFIX=/usr/local -DLLVM_ENABLE_FFI=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_TARGETS_TO_BUILD="host;WebAssembly" -DLLVM_BINUTILS_INCDIR=/usr/local/include -DLLVM_INCLUDE_BENCHMARKS=OFF -DCLANG_DEFAULT_PIE_ON_LINUX=ON -DCLANG_CONFIG_FILE_SYSTEM_DIR=/usr/local/etc/clang -DCMAKE_VERBOSE_MAKEFILE=TRUE -Wno-dev -G Ninja ../ find . -name flags.make -type f -exec sed -i 's/ -O3 -g//g' {} \; find . -name flags.make -type f -exec sed -i 's/ -O3//g' {} \; find . -name link.txt -type f -exec sed -i 's/-Wl,-O3/-Wl -Os/g' {} \; find . -name AddLLVM.cmake -type f -exec sed -i 's/-Wl,-O3/-Wl,-Os/g' {} \; find . -name compile_commands.json -type f -exec sed -i 's/ -O3 -g//g' {} \; find . -name build.make -type f -exec sed -i 's/ -O3 -g//g' {} \; ninja [7h 28m 46s] 5h 7m 02s sudo ninja install sudo mkdir /usr/local/lib/bfd-plugins cd /usr/local/lib/bfd-plugins sudo ln -s ../LLVMgold.so ./ [links against ncursesw without ncursesw-dev]