Giter Club home page Giter Club logo

gcc-build's Introduction

GCC Cross-Compiler Toolchain Build Script

This repository contains the script needed to compile bare-metal GCC for various architectures using Linux distributions. The GCC source is fetched from the release branch hence, contains all the release branch changes.

Before we start

Below are the packages you'll need

  • Ubuntu or other Debian based distros

    Note: On Ubuntu 20.04, the default GCC version is gcc 9.3.x which (in my test cases) brought in a lot of unneeded regressions. This was however fixed by compiling the toolchain itself with GCC 10

    To install and set GCC 10 as the default compiler, you need to:

    apt-get update ```
    
    ```bash sudo apt-get install flex bison ncurses-dev texinfo gcc gperf patch
    libtool automake g++ libncurses5-dev gawk subversion expat libexpat1-dev
    python-all-dev binutils-dev bc libcap-dev autoconf libgmp-dev
    build-essential pkg-config libmpc-dev libmpfr-dev autopoint gettext txt2man
    liblzma-dev libssl-dev libz-dev mercurial wget tar gcc-10 g++-10 zstd
    --fix-broken --fix-missing ```
    
  • Arch Linux

    bash sudo pacman -S base-devel clang cmake git libc++ lld lldb ninja

  • Fedora

    mpfr-devel gmp-devel libmpc-devel zlib-devel glibc-devel.i686 glibc-devel
    binutils-devel g++ texinfo bison flex cmake which clang ninja-build lld ```

Usage

Running this script is quite simple. We start by cloning this repository: bash git clone https://github.com/KenHV/gcc-build.git gcc-build bash ./build-gcc.sh -a <architechture>

As of now, I only support arm, arm64 and x86 (compiles for x86_64 only). This list is subject to change as I receive requests.

Keep in mind that this script contains just the bare minimum prerequisites.

Credits

Looking for precompiled toolchains?

My GCC cross-compiler builds are automated and pushed weekly i.e. on Sundays at 00:00 GMT (05:30 IST). They are pushed to:

Contributing to this repo

You're more than welcome to improve the contents within this script with a pull request. Enjoy :)

gcc-build's People

Contributors

mvaisakh avatar kenhv avatar djchittoor avatar panchajanya1999 avatar leddaz avatar cyberknight777 avatar jebaitedneko avatar dakkshesh07 avatar perosar avatar sourajitk 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.