Mercurial > hg > aboriginal
view cross-compiler.sh @ 1674:263bb9ff9657
Fix parallel (NOP) host-tools.sh calls.
The "build hello world" smoketest creates and deletes an output file. It used
to produce this temp file in build/host, but that changed the directory
timestamp so record-commands thought something changed and rebuilt its
symlink list, screwing up parallel builds that were using that.
The first fix moved the tempfile to host-temp, but since every host-tools
build deletes and recreates that directory, parallel builds still screwed
each other up.
The new fix is -o /dev/null so the compile still returns an error code, but
the temp file is disposed of. Multiple processes writing to /dev/null in
parallel shouldn't cause a problem.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 17 Aug 2014 13:00:20 -0500 |
parents | 7eabfa815c90 |
children |
line wrap: on
line source
#!/bin/bash # Build a more advanced cross compiler, including thread support and uClibc++, # built --with-shared (which produces libgcc_s.so), statically linked # against uClibc on the host (for portability), and including the $TARGET-ldd # and $TARGET-ldconfig utilities. # Building this requires two existing (simple) cross compilers: one for # the host (to build the executables) and one for the target (to build # the libraries). # This is a simple wrapper for native-compiler.sh, we re-use the canadian # cross infrastructure in there to build a very similar compiler. . sources/include.sh || exit 1 # Unless told otherwise, create statically linked i686 host binaries (which # should run on an x86-64 host just fine, even if it hasn't got 32-bit # libraries installed). BUILD_STATIC=${BUILD_STATIC:-all} HOST_ARCH="${CROSS_COMPILER_HOST:-i686}" \ TOOLCHAIN_PREFIX="${1}-" STAGE_NAME=cross-compiler \ ./native-compiler.sh "$1" || exit 1 # Run the cross compiler smoke test if requested. if [ ! -z "$CROSS_SMOKE_TEST" ] then more/cross-smoke-test.sh "$ARCH" || exit 1 fi