annotate buildall.sh @ 785:5ed920fc2ea5

Bugfix, missed a variable rename.
author Rob Landley <rob@landley.net>
date Sun, 05 Jul 2009 21:34:12 -0500
parents e373d2b6d0b8
children 23bff7aa79eb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
2
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # Build every target architecture, creating out-$ARCH.txt log files.
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
4 # If $FORK is set, build them in parallel.
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
5
669
1cf41855bb85 More error checking.
Rob Landley <rob@landley.net>
parents: 630
diff changeset
6 . sources/functions.sh || exit 1
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
7
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
8 [ -z "${ARCHES}" ] &&
722
b5c0cf2e7f61 Fix thinkos.
Rob Landley <rob@landley.net>
parents: 721
diff changeset
9 ARCHES="$(cd sources/targets/; ls | grep -v '^hw-')"
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
10 [ -z "$ALLARCHES" ] &&
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
11 ALLARCHES="${ARCHES} $(cd sources/targets; ls | grep '^hw-')"
744
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
12 export FAIL_QUIET=1
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
13
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
14 DO_SKIP_STAGE_TARBALLS="$SKIP_STAGE_TARBALLS"
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
15 [ ! -z "$CROSS_COMPILERS_EH" ] && DO_SKIP_STAGE_TARBALLS=1
717
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
16
778
e373d2b6d0b8 Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents: 776
diff changeset
17 [ ! -z "$FORK" ] && QUIET='| grep "^==="'
e373d2b6d0b8 Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents: 776
diff changeset
18
e373d2b6d0b8 Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents: 776
diff changeset
19 trap "killtree $$" EXIT
e373d2b6d0b8 Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents: 776
diff changeset
20
717
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
21 # Perform initial setup that doesn't parallelize well: Download source,
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
22 # build host tools, extract source.
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
23
755
38534e7a4844 Largely cosmetic change.
Rob Landley <rob@landley.net>
parents: 744
diff changeset
24 blank_tempdir build
769
5cb8f24c116a Have buildall save its logs in build/logs instead of build/.
Rob Landley <rob@landley.net>
parents: 755
diff changeset
25 mkdir -p build/logs
736
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
26 (./download.sh && ./host-tools.sh && ./download.sh --extract || dienow ) 2>&1 |
769
5cb8f24c116a Have buildall save its logs in build/logs instead of build/.
Rob Landley <rob@landley.net>
parents: 755
diff changeset
27 tee build/logs/out-host.txt
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
28
630
0e8a887f9d8b buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents: 610
diff changeset
29 # Create README file (requires build/sources to be extracted)
0e8a887f9d8b buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents: 610
diff changeset
30
722
b5c0cf2e7f61 Fix thinkos.
Rob Landley <rob@landley.net>
parents: 721
diff changeset
31 cat packages/MANIFEST sources/toys/README.footer > build/README || exit 1
630
0e8a887f9d8b buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents: 610
diff changeset
32
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
33 # Build all the initial cross compilers, possibly in parallel
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
34
717
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
35 # These are dynamically linked on the host, --disable-shared, no uClibc++.
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
36
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
37 for i in ${ARCHES}
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
38 do
769
5cb8f24c116a Have buildall save its logs in build/logs instead of build/.
Rob Landley <rob@landley.net>
parents: 755
diff changeset
39 LOG=build/logs/cross-dynamic-${i}.txt \
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
40 SKIP_STAGE_TARBALLS="$DO_SKIP_STAGE_TARBALLS" \
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
41 doforklog ./cross-compiler.sh $i
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
42 done
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
43
773
2b9e8af90917 Remove wait4background, the shell has a builtin "wait" and we don't care about non-zero wait counts anymore.
Rob Landley <rob@landley.net>
parents: 769
diff changeset
44 wait
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
45
717
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
46 # Should we do the static compilers via canadian cross?
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
47
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
48 if [ ! -z "$CROSS_COMPILERS_EH" ]
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
49 then
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
50
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
51 # Build the static cross compilers, possibly in parallel
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
52
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
53 # These are statically linked against uClibc on the host (for portability),
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
54 # built --with-shared, and have uClibc++ installed.
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
55
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
56 # To build each of these we need two existing cross compilers: one for
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
57 # the host (to build the executables) and one for the target (to build
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
58 # the libraries).
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
59
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
60 for i in ${ARCHES}
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
61 do
769
5cb8f24c116a Have buildall save its logs in build/logs instead of build/.
Rob Landley <rob@landley.net>
parents: 755
diff changeset
62 LOG=build/logs/cross-static-${i}.txt SKIP_STAGE_TARBALLS=1 BUILD_STATIC=1 \
736
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
63 FROM_ARCH="$CROSS_COMPILERS_EH" NATIVE_TOOLCHAIN=only \
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
64 STAGE_NAME=cross-static doforklog ./root-filesystem.sh $i
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
65 done
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
66
773
2b9e8af90917 Remove wait4background, the shell has a builtin "wait" and we don't care about non-zero wait counts anymore.
Rob Landley <rob@landley.net>
parents: 769
diff changeset
67 wait
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
68
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
69 # Replace the dynamic cross compilers with the static ones, and tar 'em up.
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
70
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
71 rm -rf build/dynamic &&
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
72 mkdir -p build/dynamic &&
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
73 mv build/cross-compiler-* build/dynamic || exit 1
717
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
74
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
75 for i in ${ARCHES}
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
76 do
744
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
77 mv build/{root-filesystem-$i,cross-compiler-$i} 2>/dev/null &&
736
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
78 doforklog tar cjfC build/cross-compiler-$i.tar.bz2 build cross-compiler-$i
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
79 done
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
80
773
2b9e8af90917 Remove wait4background, the shell has a builtin "wait" and we don't care about non-zero wait counts anymore.
Rob Landley <rob@landley.net>
parents: 769
diff changeset
81 wait
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
82
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
83 fi
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
84
736
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
85 if [ ! -z "$NATIVE_COMPILERS_EH" ]
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
86 then
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
87
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
88 # Build static native compilers for each target, possibly in parallel
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
89
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
90 for i in ${ARCHES}
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
91 do
769
5cb8f24c116a Have buildall save its logs in build/logs instead of build/.
Rob Landley <rob@landley.net>
parents: 755
diff changeset
92 LOG=build/logs/native-static-${i}.txt SKIP_STAGE_TARBALLS=1 BUILD_STATIC=1 \
736
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
93 NATIVE_TOOLCHAIN=only STAGE_NAME=native-static \
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
94 doforklog ./root-filesystem.sh $i
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
95 done
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
96
773
2b9e8af90917 Remove wait4background, the shell has a builtin "wait" and we don't care about non-zero wait counts anymore.
Rob Landley <rob@landley.net>
parents: 769
diff changeset
97 wait
736
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
98
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
99 for i in ${ARCHES}
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
100 do
744
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
101 mv build/{root-filesystem-$i,natemp-$i} 2>/dev/null &&
736
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
102 doforklog tar cjfC build/native-compiler-$i.tar.bz2 build/natemp-"$i" .
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
103 done
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
104
773
2b9e8af90917 Remove wait4background, the shell has a builtin "wait" and we don't care about non-zero wait counts anymore.
Rob Landley <rob@landley.net>
parents: 769
diff changeset
105 wait
736
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
106
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
107 rm -rf build/natemp-* &
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
108 fi
88c2f1225e35 Build statically linked native compiler tarballs (extract 'em on any native system and build with them), and fix several unrelated bugs.
Rob Landley <rob@landley.net>
parents: 722
diff changeset
109
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
110 # Now that we have our cross compilers, use them to build root filesystems.
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
111
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
112 for i in ${ARCHES}
717
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
113 do
769
5cb8f24c116a Have buildall save its logs in build/logs instead of build/.
Rob Landley <rob@landley.net>
parents: 755
diff changeset
114 LOG=build/logs/root-filesystem-$i.txt doforklog ./root-filesystem.sh $i
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
115 done
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
116
773
2b9e8af90917 Remove wait4background, the shell has a builtin "wait" and we don't care about non-zero wait counts anymore.
Rob Landley <rob@landley.net>
parents: 769
diff changeset
117 wait
721
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
118
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
119 # Package all targets, including hw-targets.
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
120
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
121 for i in ${ALLARCHES}
f0ede6d6c952 Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents: 718
diff changeset
122 do
769
5cb8f24c116a Have buildall save its logs in build/logs instead of build/.
Rob Landley <rob@landley.net>
parents: 755
diff changeset
123 LOG=build/logs/system-image-$i.txt doforklog ./system-image.sh $i
717
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
124 done
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
125
744
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
126 # Run smoketest.sh for each non-hw target.
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
127
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
128 for i in ${ARCHES}
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
129 do
769
5cb8f24c116a Have buildall save its logs in build/logs instead of build/.
Rob Landley <rob@landley.net>
parents: 755
diff changeset
130 LOG=build/logs/smoketest-$i.txt doforklog ./smoketest.sh $i
744
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
131 done
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
132
773
2b9e8af90917 Remove wait4background, the shell has a builtin "wait" and we don't care about non-zero wait counts anymore.
Rob Landley <rob@landley.net>
parents: 769
diff changeset
133 wait