2019-02-03 01:14:51 -05:00
|
|
|
redo-ifchange arches configure redoconf/utils.sh
|
|
|
|
|
|
|
|
|
|
config() {
|
|
|
|
|
local dir="$1" arch="$2"
|
|
|
|
|
shift
|
|
|
|
|
shift
|
|
|
|
|
[ -d "$dir" ] || mkdir "$dir"
|
|
|
|
|
(
|
|
|
|
|
cd "$dir" &&
|
|
|
|
|
../configure --host="$arch" "$@" &&
|
|
|
|
|
echo "$dir"
|
2019-02-25 13:44:28 +00:00
|
|
|
)
|
2019-02-03 01:14:51 -05:00
|
|
|
}
|
|
|
|
|
|
2019-02-25 13:44:28 +00:00
|
|
|
dirs=$(
|
|
|
|
|
for d in $(cat arches); do
|
|
|
|
|
if [ "$d" = "native" ]; then
|
|
|
|
|
arch=""
|
|
|
|
|
else
|
|
|
|
|
arch="$d"
|
|
|
|
|
fi
|
|
|
|
|
config "out.$d" "$arch"
|
|
|
|
|
config "out.$d.static" "$arch" "--enable-static"
|
|
|
|
|
config "out.$d.opt" "$arch" "--enable-optimization"
|
|
|
|
|
done
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
for dir in $dirs; do
|
|
|
|
|
echo "$dir/rc/CC.rc"
|
|
|
|
|
done | xargs redo-ifchange
|
|
|
|
|
|
|
|
|
|
for dir in $dirs; do
|
|
|
|
|
( cd "$dir" &&
|
|
|
|
|
set --;
|
|
|
|
|
. ./redoconf.rc &&
|
|
|
|
|
rc_include rc/CC.rc &&
|
|
|
|
|
[ -n "$HAVE_CC" ] &&
|
|
|
|
|
echo "$dir"
|
2020-01-05 02:52:26 -05:00
|
|
|
) || (echo "Skipping '$dir' - no working C compiler." >&2)
|
2019-02-23 16:45:08 -05:00
|
|
|
done >$3
|
2019-02-03 01:14:51 -05:00
|
|
|
|
|
|
|
|
wait
|