Mercurial > hg > aboriginal
annotate buildall.sh @ 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.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 11 Jun 2009 05:42:51 -0500 |
parents | 88c2f1225e35 |
children | 38534e7a4844 |
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 | 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 |
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
|
8 rm -rf build |
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
|
9 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
10 [ -z "${ARCHES}" ] && |
722 | 11 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
|
12 [ -z "$ALLARCHES" ] && |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
13 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
|
14 export FAIL_QUIET=1 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
15 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
16 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
|
17 [ ! -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
|
18 |
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
|
19 # Run command in the background or foreground, depending on $FORK |
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
|
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 doforklog() |
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 { |
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
|
23 [ -z "$LOG" ] && LOG=/dev/null |
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
|
24 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
25 if [ ! -z "$FORK" ] |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
26 then |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
27 $* 2>&1 | tee "$LOG" | grep '^===' & |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
28 else |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
29 $* 2>&1 | tee "$LOG" |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
30 fi |
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
|
31 } |
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
|
32 |
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
|
33 # 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
|
34 # 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
|
35 |
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
|
36 (./download.sh && ./host-tools.sh && ./download.sh --extract || dienow ) 2>&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
|
37 tee 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
|
38 |
630
0e8a887f9d8b
buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents:
610
diff
changeset
|
39 # 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
|
40 |
722 | 41 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
|
42 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
43 # 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
|
44 |
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
|
45 # 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
|
46 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
47 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
|
48 do |
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
|
49 LOG=build/cross-dynamic-${i}.txt \ |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
50 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
|
51 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
|
52 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
|
53 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
54 wait4background |
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
|
55 |
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
|
56 # 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
|
57 |
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
|
58 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
|
59 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
|
60 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
61 # 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
|
62 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
63 # 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
|
64 # 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
|
65 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
66 # 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
|
67 # 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
|
68 # the libraries). |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
69 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
70 for i in ${ARCHES} |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
71 do |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
72 LOG=build/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
|
73 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
|
74 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
|
75 done |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
76 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
77 wait4background |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
78 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
79 # 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
|
80 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
81 rm -rf build/dynamic && |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
82 mkdir -p build/dynamic && |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
83 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
|
84 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
85 for i in ${ARCHES} |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
86 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
|
87 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
|
88 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
|
89 done |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
90 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
91 wait4background |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
92 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
93 fi |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
94 |
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
|
95 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
|
96 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
|
97 |
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 # 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
|
99 |
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 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
|
101 do |
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 LOG=build/native-static-${i}.txt SKIP_STAGE_TARBALLS=1 BUILD_STATIC=1 \ |
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 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
|
104 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
|
105 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
|
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 wait4background |
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 |
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 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
|
110 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
|
111 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
|
112 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
|
113 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
|
114 |
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
|
115 wait4background |
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
|
116 |
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
|
117 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
|
118 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
|
119 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
120 # 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
|
121 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
122 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
|
123 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
|
124 LOG=build/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
|
125 done |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
126 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
127 wait4background |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
128 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
129 # 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
|
130 |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
131 for i in ${ALLARCHES} |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
132 do |
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
718
diff
changeset
|
133 LOG=build/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
|
134 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
|
135 |
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
|
136 # 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
|
137 |
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
|
138 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
|
139 do |
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
|
140 LOG=build/smoketest-$i.txt doforklog ./smoketest.sh $i |
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
|
141 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
|
142 |
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
|
143 wait4background 0 |