Code Monkey home page Code Monkey logo

gentoo-hardened-clang's Introduction

gentoo-hardened-clang

Config for a hardened Gentoo system built on top of the Clang profile.

This is a work in progress

Usage

To test this out, start from scratch following the Gentoo handbook, and at install time:

  • Choose the stage3-amd64-clang-openrc tarball.
  • Before the mirror select step, copy the contents of /etc/portage/ to the system's portage dir.
    • Make sure to inspect them all before proceeding. This does more than hardening the Clang toolchain.
    • You may wish to remove package.use/mandoc and package.accept_keywords/mandoc and remove the PORTAGE_COMPRESS lines in make.conf if you do not want to use mandoc as the system man.
    • In make.conf, you may wish to adjust MAKEOPTS="-j$(nproc)" if you want to keep a cpu core free during compile time.
  • If you want the full base system that this repository provides, add the contents of /var/lib/portage/world to the system's @world file.
  • When you're at the stage of emerging/updating @world for the first time, brace yourself.

LLVM_TARGETS

Unfortunately, Gentoo currently forces all LLVM targets to be enabled at build time, which triples LLVM and Clang's compile time. This is a necessay evil due to a bug which causes an issue with reverse dependencies (e.g. Rust) when some targets are disabled. It is possible to disable the unnecessary targets by uncommenting them in /etc/portage/profile/package.use.force, as long as you understand that you'll probably have to build all targets anyway at some point (provided the issue hasn't been fixed by then).

I can only confirm that the packages in the base system and the @world file build perfectly fine with targets disabled by force.

TODO

  • Provide a hardened kernel config
  • Remove multilib support
  • Switch to Musl

gentoo-hardened-clang's People

Contributors

ianlecorbeau avatar

Stargazers

 avatar

Watchers

 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.