Mercurial > hg > aboriginal
annotate cross-compiler.sh @ 1737:1acbe7e78d9d draft
Switch from bz2 to gz tarball output.
bz2 is slowly being replaced by lz variants, but gzip isn't going anywhere.
(It retains a niche as a streaming protocol, it's the 80/20 solution optimizing
for speed, low memory requirements, and simple compressor implementation.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 20 Feb 2015 13:12:45 -0600 |
parents | 7eabfa815c90 |
children |
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 | 4 # built --with-shared (which produces libgcc_s.so), statically linked |
5 # against uClibc on the host (for portability), and including the $TARGET-ldd | |
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 |
1350
7eabfa815c90
Split up system-image.sh into root-image.sh, linux-kernel.sh, and system-image.sh. Rename CROSS_HOST_ARCH to CROSS_COMPILER_HOST.
Rob Landley <rob@landley.net>
parents:
1207
diff
changeset
|
21 BUILD_STATIC=${BUILD_STATIC:-all} HOST_ARCH="${CROSS_COMPILER_HOST:-i686}" \ |
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
|
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 |