annotate cross-compiler.sh @ 1229:313c702a0984

Remove toybox.
author Rob Landley <rob@landley.net>
date Tue, 24 Aug 2010 03:08:47 -0500
parents 4021fb1183d7
children 7eabfa815c90
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1144
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
2
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # Build a more advanced cross compiler, including thread support and uClibc++,
1186
ac490c50f9f5 Comment tweak.
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
4 # built --with-shared (which produces libgcc_s.so), statically linked
ac490c50f9f5 Comment tweak.
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
5 # against uClibc on the host (for portability), and including the $TARGET-ldd
ac490c50f9f5 Comment tweak.
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
6 # and $TARGET-ldconfig utilities.
1144
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
7
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
8 # Building this requires two existing (simple) cross compilers: one for
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
9 # the host (to build the executables) and one for the target (to build
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
10 # the libraries).
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
11
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
12 # This is a simple wrapper for native-compiler.sh, we re-use the canadian
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
13 # cross infrastructure in there to build a very similar compiler.
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
14
1207
4021fb1183d7 Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents: 1186
diff changeset
15 . sources/include.sh || exit 1
1144
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
16
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
17 # Unless told otherwise, create statically linked i686 host binaries (which
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
18 # should run on an x86-64 host just fine, even if it hasn't got 32-bit
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
19 # libraries installed).
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
20
1207
4021fb1183d7 Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents: 1186
diff changeset
21 BUILD_STATIC=${BUILD_STATIC:-all} HOST_ARCH="${CROSS_HOST_ARCH:-i686}" \
4021fb1183d7 Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents: 1186
diff changeset
22 TOOLCHAIN_PREFIX="${1}-" STAGE_NAME=cross-compiler \
4021fb1183d7 Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents: 1186
diff changeset
23 ./native-compiler.sh "$1" || exit 1
1144
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
24
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
25 # Run the cross compiler smoke test if requested.
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
26
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
27 if [ ! -z "$CROSS_SMOKE_TEST" ]
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
28 then
1157
300e6d919d86 Move "sources/more/" to just "more/", add a README explaining why those scripts are there, and adjust calls to them.
Rob Landley <rob@landley.net>
parents: 1144
diff changeset
29 more/cross-smoke-test.sh "$ARCH" || exit 1
1144
319327a27998 Add cross-compiler.sh back. (If you rename a file and add an old one in the same commit, mercurial gets confused. Also, mercurial doesn't consider "this file was deleted" something worth showing in log -v, so figuring out what happened is an exercise in frustration. Obviously deleting a file is not an important part of its history...)
Rob Landley <rob@landley.net>
parents:
diff changeset
30 fi