view native-compiler.sh @ 988:30e4bab11f9e

Rename SKIP_STAGE_TARBALLS to NO_STAGE_TARBALLS (for consistency), and make system-image.sh use it instead of doing it by hand.
author Rob Landley <rob@landley.net>
date Wed, 24 Feb 2010 10:31:10 -0600
parents b6d7a815e47a
children bbcafba8a594
line wrap: on
line source

#!/bin/bash

# Build a compiler for a given target

source sources/include.sh || exit 1
read_arch_dir "$1"
check_for_base_arch || exit 0
check_prerequisite "${ARCH}-cc"
check_prerequisite "${FROM_ARCH}-cc"

mkdir -p "$STAGE_DIR/bin" || dienow

# Build C Library

build_section linux-headers
build_section uClibc

# Build binutils, gcc, and ccwrap

build_section binutils
build_section gcc
build_section ccwrap

# Tell future packages to link against the libraries in the new root filesystem,
# rather than the ones in the cross compiler directory.

export "$(echo $ARCH | sed 's/-/_/g')"_CCWRAP_TOPDIR="$STAGE_DIR"

build_section uClibc++

# Delete some unneeded files

[ -z "$SKIP_STRIP" ] && rm -rf "$STAGE_DIR"/{info,man}

create_stage_tarball