comparison build.sh @ 1007:48784ae8533e

Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
author Rob Landley <rob@landley.net>
date Thu, 25 Mar 2010 18:54:30 -0500
parents bbcafba8a594
children 5897a868313e
comparison
equal deleted inserted replaced
1006:f99d25daec6a 1007:48784ae8533e
37 37
38 time ./host-tools.sh || exit 1 38 time ./host-tools.sh || exit 1
39 39
40 # Do we need to build the simple cross compiler? 40 # Do we need to build the simple cross compiler?
41 41
42 # This version has no thread support, no libgcc_s.so, doesn't include
43 # uClibc++, and is dynamically linked against the host's shared libraries.
44
45 if not_already simple-cross-compiler 42 if not_already simple-cross-compiler
46 then 43 then
47 # If we need to build cross compiler, assume root filesystem is stale. 44 # If we need to build cross compiler, assume root filesystem is stale.
48 45
49 rm -rf "$BUILD/root-filesystem-$ARCH.tar.bz2" 46 rm -rf "$BUILD/root-filesystem-$ARCH.tar.bz2"
50 time ./simple-cross-compiler.sh "$ARCH" || exit 1 47 time ./simple-cross-compiler.sh "$ARCH" || exit 1
48
49 if [ ! -z "$CROSS_SMOKE_TEST" ]
50 then
51 sources/more/cross-smoke-test.sh "$ARCH" || exit 1
52 fi
51 fi 53 fi
52 54
53 # Optionally, we can build a statically linked compiler via canadian cross. 55 # Optionally, we can build a more capable statically linked compiler via
54 56 # canadian cross. (It's more powerful than we need here, but if you're going
55 # We don't autodetect the host because i686 is more portable (running on 57 # to use the cross compiler in other contexts this is probably what you want.)
56 # both 64 and 32 bit hosts), but x86_64 is (slightly) faster on a 64 bit host.
57 58
58 if [ ! -z "$STATIC_CC_HOST" ] && not_already cross-compiler 59 if [ ! -z "$STATIC_CC_HOST" ] && not_already cross-compiler
59 then 60 then
60 61
61 # These are statically linked against uClibc on the host (for portability), 62 # These are statically linked against uClibc on the host (for portability),
65 # the host (to build the executables) and one for the target (to build 66 # the host (to build the executables) and one for the target (to build
66 # the libraries). 67 # the libraries).
67 68
68 BUILD_STATIC=1 FROM_ARCH="$STATIC_CC_HOST" STAGE_NAME=cross-compiler \ 69 BUILD_STATIC=1 FROM_ARCH="$STATIC_CC_HOST" STAGE_NAME=cross-compiler \
69 ./native-compiler.sh "$ARCH" || exit 1 70 ./native-compiler.sh "$ARCH" || exit 1
71
72 if [ ! -z "$CROSS_SMOKE_TEST" ]
73 then
74 sources/more/cross-smoke-test.sh "$ARCH" || exit 1
75 fi
70 fi 76 fi
71 77
72 # Build a native compiler. It's statically linked by default so it can be 78 # Build a native compiler. It's statically linked by default so it can be
73 # run on an arbitrary host system. 79 # run on an arbitrary host system.
74 80