Skip to content

Factory for cross compilers inside of Docker container

Notifications You must be signed in to change notification settings

v3l0c1r4pt0r/cc-factory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 

Repository files navigation

CC-Factory

Factory for cross compilers inside of Docker container

Overview

This repository provides Docker containers that allows to build very specific GCC-LINUX-LIBC toolchain in reproducible manner. You don't see anything here, because it is organised into branches. Each branch is separate triplet of compiler, OS and standard library, usually with very specific version of each component.

Main purpose from developing this repository is to allow to recreate toolchains for systems that did not provide public SDKs. By the way it should also work decently in providing latest compilers for any architecture one would like.

Usage

Ready-to-use SDK pacakge

Most of users should prefer downloading precompiled toolchain. They are all available in Releases page. After downloading package of your choice, refer to Installing SDK section.

Compiling from source

  1. Select desired target from Table of contents
  2. Checkout to target's branch: git checkout <branch-name>
  3. Make sure Docker is running and you have access to Docker daemon
  4. Build container with make build
  5. Wait couple of minutes for toolchain to build
  6. Run container: make run
  7. If you want to play with toolchain in isolated container, type make shell. You will be dropped into normal user interactive shell
  8. If you prefer to run toolchain on your own system, type: make sdk
  9. outdir directory should appear, with tarball inside

Installing SDK

If you decided to export SDK outside container, its installation is as simple as unpacking the package to /:

tar -zxvf mips-linux-uclibc.tar.gz -C /

By default SDK is installed in /opt/${TARGET} directory, where ${TARGET} is full target name, e.g. mips-linux-uclibc for big endian MIPS with uClibc as C library.

If you prefer to have SDK installed elsewhere, you have to specify this before attempting to build the image, by editing SDK_ROOT variable in Dockefile. If you try to unpack SDK into different path, it simply won't work, as this path is hardcoded into compiler!

Table of contents

Platform CC OS LIBC branch
MIPS gcc 4.6.4 Linux 4.1.38 uClibc 1.0.12 mips-gcc4.6.4-linux4.1.38-uclibc1.0.12
MIPSEL gcc 4.6.4 Linux 3.4.113 uClibc 1.0.26 mipsel-gcc4.6.4-linux3.4.113-uclibc1.0.26
MIPS gcc 10.2.0 Linux 5.9.13 uClibc 1.0.36 mips-gcc10.2.0-linux5.9.13-uclibc1.0.36
MIPSEL gcc 10.2.0 Linux 5.9.13 uClibc 1.0.36 mipsel-gcc10.2.0-linux5.9.13-uclibc1.0.36
x86_64 gcc 10.2.0 Linux 5.9.13 uClibc 1.0.36 x86_64-gcc10.2.0-linux5.9.13-uclibc1.0.36

In progress (help wanted!)

Platform CC OS LIBC branch
MIPS gcc 3.3.2 Linux 4.1.38 uClibc 1.0.12 mips-gcc3.3.2-linux4.1.38-uclibc1.0.12