Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erikw/ewxb-gcc-cross-compiler-builder
A script for building a full GCC + glibc toolchain from scratch (with Go support via gccgo) in multiple stages.
https://github.com/erikw/ewxb-gcc-cross-compiler-builder
cross-compile cross-compiler cross-compiler-toolchain gcc glibc hacktoberfest linux
Last synced: about 1 month ago
JSON representation
A script for building a full GCC + glibc toolchain from scratch (with Go support via gccgo) in multiple stages.
- Host: GitHub
- URL: https://github.com/erikw/ewxb-gcc-cross-compiler-builder
- Owner: erikw
- License: bsd-3-clause
- Created: 2014-03-27T12:38:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-02-15T07:23:13.000Z (almost 3 years ago)
- Last Synced: 2023-03-13T21:35:27.538Z (almost 2 years ago)
- Topics: cross-compile, cross-compiler, cross-compiler-toolchain, gcc, glibc, hacktoberfest, linux
- Language: Shell
- Homepage:
- Size: 544 KB
- Stars: 19
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ewxb - Erik Westrup's GCC cross-compiler builder
[![SLOC](https://img.shields.io/tokei/lines/github/erikw/ewxb-gcc-cross-compiler-builder?logo=codefactor&logoColor=lightgrey)](#)
[![Top programming languages used](https://img.shields.io/github/languages/top/erikw/ewxb-gcc-cross-compiler-builder)](#)This is a script documenting the steps and phases take when I compiled a GCC cross toolchain for GCC 4.9 head (with Go support). Building a cross-compiler is complex due to dependencies so a lot of bootstrapping has to be done. This script is inspired by Jim Blandy's excellent eglibc cross-compiling guide posted at eglibc's mailinglist at [\[patches\] Cross-building instructions](http://www.eglibc.org/archives/patches/msg00078.html).
This script can serve as a starting point for those who want to build a x-toolchain from scratch. Don't expect it to work in directly as it's tailored for my setup. Instead you can re-use the phases and modify the script with parameters that you need. The last phases adds Go support, which is easy to comment out if you're only interested in a C/C++ compiler.
My setup was:
* Host/Build system: Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
* Target: mips
* gcc: 4.9.0
* glibc: 2.19
* binutils: 2.24The scripts makes it easy to run specific phases (or range of phases) so that you easly can tweak a failing phase and continue with the ones that follows when you have got one phase to work. Make sure to edit [x_environment.sh](x_environment.sh) to the right versions of the packages and build paths to use.
For any details, simply read the [sauce](ewxb).
More info about using Go with a gccgo cross-compiler can be found at the [go-wiki](http://code.google.com/p/go-wiki/wiki/GccgoCrossCompilation).
![Resulting x-compiler tools](result.png)
The sweet result after playing some Rube Goldberg trickery games.