Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/konimex/kiss-llvm
A kiss-repo structure to build standalone LLVM
https://github.com/konimex/kiss-llvm
kiss-repo
Last synced: about 1 month ago
JSON representation
A kiss-repo structure to build standalone LLVM
- Host: GitHub
- URL: https://github.com/konimex/kiss-llvm
- Owner: konimex
- License: isc
- Created: 2019-12-26T14:34:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-09T05:29:23.000Z (about 3 years ago)
- Last Synced: 2024-07-28T19:32:49.838Z (5 months ago)
- Topics: kiss-repo
- Language: Shell
- Size: 177 KB
- Stars: 17
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: COPYING
Awesome Lists containing this project
- awesome-kiss - konimex/kiss-llvm - Repository structure to build LLVM without any traces of GCC libraries. (Repositories)
README
|/
|\ISS LINUX (unofficial repository) https://kisslinux.org
________________________________________________________________________This is a kiss-compliant repository structure to build LLVM without any
traces of GCC libraries. It also provides any alternatives for official
KISS packages that cannot be built in an LLVM-only environment as is.This repository is to be used in conjunction with KISS Linux
repositories and NOT as a total replacement for KISS Linux.DISCLAIMER
________________________________________________________________________While since 11 July KISS does support an LLVM/Clang toolchain as a first
class citizen along with GCC [1] (some of our changes to accommodate
systems built with kiss-llvm toolchain are also accepted), some packages
(namely, eiwd) will not work with Clang at all at present (version 1.15,
at the time I'm writing this). Those packages will *explicitly* depend
on gcc (and any attempts to build gcc with this repo will automatically
fail unless user manually overrides that by using their own repo, or
directly building it, CRUX-style, note that I won't be supporting the
use case though since I don't think it is possible without significant
headache).When submitting reports about failure to build LLVM/Clang from this
repo, report it here, not kisslinux/repo. Otherwise, you probably
can open an issue there, but please state your toolchain.Building kiss-llvm
________________________________________________________________________To build LLVM compiler infrastructure from scratch (and without any
traces of GCC), you'll need to build and install the llvm bootstrap
packaged as @llvm before building the main llvm package.See the build file for @llvm for more information. It builds
llvm proper first, clang (pass 1), compiler-rt, libunwind, libc++abi,
libc++, and finally, clang again (pass 2).NOTE: This is what I could do, however, if you can find a better way
that doesn't require 2 passes to clang, patches welcome! Also,
some required packages may be missing.Recommended: Since downloading files repeatedly is a waste of bandwidth
(especially if you have a slow Internet), you can use this
command to symlink thesource cache (usually located in
$HOME/.cache/kiss/sources):$ ln -s llvm @llvm
And make sure to download the main LLVM package sources first and NOT
the bootstrap packages (by using `kiss c` in the llvm directory, or by
using `kiss c llvm` after adding the kiss-llvm directory to $PATH, make
sure the checksums are NOT changed, git should be able to track these).Using LLVM from kiss-llvm
________________________________________________________________________After installing llvm from kiss-llvm (and uninstalling the temporary
bootstrap packages), you can use the alternatives system to switch to
LLVM-provided binutils (except as).Because programs might still detect GCC and use it, you can force Clang
by applying environment variables CC=cc and CXX=c++ after applying the
alternatives. (For some packages like Busybox, you may need to
explicitly use CC=clang, as they explicitly detect Clang through the
name of the binary)Also, you will need to rebuild every single package that links to
/lib/libstdc++.so, a small way to check if a library or a program links
to libstdc++ using the shell as follows:$ for file in /usr/bin/* /usr/lib/*; do
echo FILE: "$file" # This is as an identifier of which file
ldd "$file" | grep libstdc++
doneYou may also need to check if any packages link to libatomic.so and
libgcc_s.so.You can use kiss-owns to check which file belongs to which package, and
rebuild that.________________________________________________________________________
If you think replacing just the compiler and the binutils is not enough,
head on over to Wyverkiss [2] since the distribution also removes the
need for GNU bison and many others (GNU make cannot be removed though).
Please note that Wyverkiss will _NOT_ be supported by Dylan though.[1] https://kisslinux.org/blog/20210711a
[2] https://github.com/wyvertux/wyverkiss