comparison host-tools.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 d201f0baf0b6
children 0f4499211cfa
comparison
equal deleted inserted replaced
1673:0f61292eab70 1674:263bb9ff9657
62 62
63 # Sanity test for the host supporting static linking. 63 # Sanity test for the host supporting static linking.
64 64
65 if [ "$BUILD_STATIC" != none ] 65 if [ "$BUILD_STATIC" != none ]
66 then 66 then
67 $CC "$SOURCES/toys/hello.c" --static -o "$WORK/hello-$$" && 67 $CC "$SOURCES/toys/hello.c" --static -o /dev/null
68 rm "$WORK/hello-$$"
69 68
70 if [ $? -ne 0 ] 69 if [ $? -ne 0 ]
71 then 70 then
72 echo "Your host toolchain does not support static linking." >&2 71 echo "Your host toolchain does not support static linking." >&2
73 echo "Either install support, or export BUILD_STATIC=none" >&2 72 echo "Either install support, or export BUILD_STATIC=none" >&2