Giter VIP home page Giter VIP logo

kiss-llvm's Introduction

|/
|\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

kiss-llvm's People

Contributors

konimex avatar echawk avatar dilyn-corner avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.