out=$1
func=$2

echo "int main() { $func(); }" > test.$$.c
if ! $cc -w -x c -o test.$$.bin test.$$.c; then
    echo $func missing 1>&2
    cat $srcdir/dios/host/$(echo $func | sed -e s,__,,).c
else
    echo "/* not needed */"
fi > $out
rm -f test.$$.c test.$$.bin
