Skip to content

Instantly share code, notes, and snippets.

@renhiyama
Last active October 27, 2025 16:45
Show Gist options
  • Select an option

  • Save renhiyama/6308eeb3d14f0232fc74ec95eead228c to your computer and use it in GitHub Desktop.

Select an option

Save renhiyama/6308eeb3d14f0232fc74ec95eead228c to your computer and use it in GitHub Desktop.
Steps to run Ported LLVM for RunixOS (or any OS from RovelStars)

TIP: build with all cores export MAKEFLAGS="-j$(nproc)"

CMake modifications

Custom repo at https://gitlab.kitware.com/renhiyama/cmake . I added Modules/Platform/RunixOS.cmake alongwith 2 more similar cmake files, which adds support for my OS target.

You can clone it from mentioned repo, and then build it:

mkdir build && cd build
# build with all cores
export MAKEFLAGS="-j$(nproc)"
../bootstrap -- -DCMAKE_SYSTEM_NAME=RunixOS -DLIBMD_LIBRARY=/usr/lib/libbsd.so -DLIBMD_INCLUDE_DIR=/usr/include/bsd && make 

Do note that I am using Arch Linux for now, so the above library paths are for me. You can try omitting those two defined variables and try building without them. If it causes any issues, try downloading the depdendcies and locating them.


GLibc

Custom modifications of Glibc can be found at github.com/renhiyama/glibc . When compiling glibc into your builddir, please write this into <builddir>/configparms:

bindir=/Core/Bin
sbindir=/Core/Bin/Tools
rootsbindir=/Core/Bin/RootTools
libexecdir=/Core/LibKit
datarootdir=/Construct/StoreRoom
datadir=/Construct/StoreRoom
sysconfdir=/Construct/Config
sharedstatedir=/Construct/AppState
localstatedir=/Construct/LocalState
runstatedir=/Construct/LiveState
includedir=/Core/APIHeader
oldincludedir=/Core/APIHeader
docdir=/Construct/StoreRoom/Docs/${PACKAGE_TARNAME}
infodir=/Construct/StoreRoom/Info
libdir=/Core/LibKit
slibdir=/Core/LibKit
rtlddir=/Core/LibKit
localedir=/Construct/StoreRoom/locale
mandir=/Construct/StoreRoom/Manual

You can configure now with:

/path/to/rovelos/glibc/configure --prefix="" --with-bugurl="https://github.com/rovelstars/Planets/issues/new?title=BUG%3A%20glibc%20-%20" \                                                                                      ─╯
      --enable-bind-now \
      --enable-fortify-source \
      --enable-kernel=6.1.140 \
      --enable-multi-arch \
      --enable-stack-protector=strong \
      --disable-nscd \
      --disable-profile \
      --disable-werror \
    --host=x86_64-rovelstars-linux-runix

You can then run: make & then make install . Feel free to use DESTDIR=/somewhere/else/you/wanna/install make install if you don't want to install in /.


LLVM

Custom forked repo at https://github.com/renhiyama/llvm-project There's lots of changes all across LLVM repo. It also depends on the custom CMake build that I made above.

You can try building it via:

mkdir build && cd build
/PATH/TO/cmake/build/bin/cmake ../llvm -G Ninja \
-DCMAKE_SYSTEM_NAME=RunixOS -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" \
-DLLVM_ENABLE_RUNTIMES="libunwind;libc;libcxxabi;compiler-rt;libcxx"

LLVM is also configured to also build for AArch64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment