/usr/bin/sparsec is in sparse 0.5.0-1build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #!/bin/sh
#
# GCC compatible C compiler based on Sparse LLVM
set +e
SPARSEOPTS=""
DIRNAME=`dirname $0`
NEED_LINK=1
if [ $# -eq 0 ]; then
echo "`basename $0`: no input files"
exit 1
fi
while [ $# -gt 0 ]; do
case $1 in
'-o')
OUTFILE=$2
shift
;;
'-c')
NEED_LINK=0
;;
*)
SPARSEOPTS="$SPARSEOPTS $1 " ;;
esac
shift
done
TMPLLVM=`mktemp -t tmp.XXXXXX`".llvm"
TMPFILE=`mktemp -t tmp.XXXXXX`".o"
$DIRNAME/sparse-llvm $SPARSEOPTS > $TMPLLVM
llc -o - $TMPLLVM | as -o $TMPFILE
if [ $NEED_LINK -eq 1 ]; then
if [ -z $OUTFILE ]; then
OUTFILE=a.out
fi
gcc $TMPFILE -o $OUTFILE
else
if [ -z $OUTFILE ]; then
echo "`basename $0`: no output file"
exit 1
fi
mv $TMPFILE $OUTFILE
fi
rm -f $TMPLLVM
|