#!/bin/bash # Build a simple cross compiler for the specified target. # This simple compiler has no thread support, no libgcc_s.so, doesn't include # uClibc++, and is dynamically linked against the host's shared libraries. # Its stripped down nature makes it easy to build on an arbitrary host, and # provides just enough capability to build a root filesystem, and to be used # as a distcc accelerator from within that system. # Get lots of predefined environment variables and shell functions. source sources/include.sh || exit 1 # Parse sources/targets/$1 load_target $1 # If this target has a base architecture that's already been built, use that. check_for_base_arch || exit 0 export TOOLCHAIN_PREFIX = ""$(ARCH)-"" # Build binutils, gcc, and ccwrap build_section binutils test ! -z $ELF2FLT && build_section elf2flt build_section gcc build_section ccwrap if test ! -z $KARCH { # Build C Library build_section linux-headers if test -z $UCLIBC_CONFIG || test ! -z $MUSL { build_section musl } else { build_section uClibc } } test ! -z $KARCH && cat > "$(STAGE_DIR)"/README