All Projects → konimex → kiss-llvm

konimex / kiss-llvm

Licence: ISC License
A kiss-repo structure to build standalone LLVM

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to kiss-llvm

kiss-games
👾 muh games.
Stars: ✭ 65 (+306.25%)
Mutual labels:  kiss-repo
kiss-live
📀 Script to build livecd iso for KISSLinux
Stars: ✭ 43 (+168.75%)
Mutual labels:  kiss-repo
kiss-garbage
📦 KISS garbage repository
Stars: ✭ 18 (+12.5%)
Mutual labels:  kiss-repo
community
KISS - Community Repository (temporarily closed for maintenance)
Stars: ✭ 103 (+543.75%)
Mutual labels:  kiss-repo
awesome-kiss
Awesome KISS repos, spins, commands, etc
Stars: ✭ 28 (+75%)
Mutual labels:  kiss-repo
KISS-kde
A KISS repository for KDE and friends
Stars: ✭ 21 (+31.25%)
Mutual labels:  kiss-repo
grepo
GKISS - A fork of KISS Linux that uses the GNU C library, mirror of https://codeberg.org/kiss-community/grepo
Stars: ✭ 51 (+218.75%)
Mutual labels:  kiss-repo
kiss-ricing
tools to help your KISS install look nice
Stars: ✭ 14 (-12.5%)
Mutual labels:  kiss-repo
community
Officially unofficial KISS community repository, mirror of https://codeberg.org/kiss-community/community
Stars: ✭ 46 (+187.5%)
Mutual labels:  kiss-repo
mywayland
🍨 Wlroots and friends for KISS
Stars: ✭ 25 (+56.25%)
Mutual labels:  kiss-repo
|/
|\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++
  done

You 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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].