annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
946
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # Build a compiler for a given target
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 source sources/include.sh || exit 1
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 read_arch_dir "$1"
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 check_for_base_arch || exit 0
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
8 check_prerequisite "${ARCH}-cc"
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 check_prerequisite "${FROM_ARCH}-cc"
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
10
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 mkdir -p "$STAGE_DIR/bin" || dienow
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
12
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 # Build C Library
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
14
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 build_section linux-headers
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 build_section uClibc
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
17
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 # Build binutils, gcc, and ccwrap
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
19
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 build_section binutils
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 build_section gcc
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 build_section ccwrap
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
23
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 # Tell future packages to link against the libraries in the new root filesystem,
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 # rather than the ones in the cross compiler directory.
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
26
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
27 export "$(echo $ARCH | sed 's/-/_/g')"_CCWRAP_TOPDIR="$STAGE_DIR"
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
28
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
29 build_section uClibc++
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
30
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
31 # Delete some unneeded files
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
32
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
33 [ -z "$SKIP_STRIP" ] && rm -rf "$STAGE_DIR"/{info,man}
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
34
b2cb36998d54 Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff changeset
35 create_stage_tarball