Mercurial > hg > aboriginal
annotate native-compiler.sh @ 946:b2cb36998d54
Helps to actually remember to add the new file.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 03 Jan 2010 22:34:06 -0600 |
parents | |
children | b6d7a815e47a |
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 blank_tempdir "$STAGE_DIR" |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 mkdir -p "$STAGE_DIR/bin" || dienow |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 # Build C Library |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 build_section linux-headers |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 build_section uClibc |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 # Build binutils, gcc, and ccwrap |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 build_section binutils |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 build_section gcc |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
23 build_section ccwrap |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
24 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
25 # 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
|
26 # 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
|
27 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
28 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
|
29 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
30 build_section uClibc++ |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 # Delete some unneeded files |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 [ -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
|
35 |
b2cb36998d54
Helps to actually remember to add the new file.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 create_stage_tarball |