blaise/vendor/qbe/tools/cra.sh
Graeme Geldenhuys 25de8be212 Fix compilation errors; vendor QBE 1.2; end-to-end Hello World works
Fix TProgram.Uses reserved-word clash (renamed to UsedUnits), nested
brace-comment in uParser.pas, and missing uAST in Blaise.pas uses clause.

Vendor QBE 1.2 source in vendor/qbe/ (built locally with make; binary
excluded via .gitignore). End-to-end pipeline confirmed: Blaise compiles
Hello World and Calc (6*7=42) to native x86_64 Linux binaries.

71/71 FPCUnit tests passing.
2026-04-20 16:38:57 +01:00

39 lines
503 B
Bash
Executable file

#!/bin/sh
DIR=`cd $(dirname "$0"); pwd`
QBE=$DIR/../qbe
BUGF=/tmp/bug.id
FIND=$1
FIND=${FIND:-afl-find}
if ! test -f $BUGF
then
echo 1 > $BUGF
fi
while true
do
ID=`cat $BUGF`
if test `ls $FIND/crashes/id* | wc -l` -lt $ID
then
rm -f bug.ssa
echo "All done!"
exit 0
fi
BUG=`ls $FIND/crashes/id* | sed -ne "${ID}{p;q}"`
echo "*** Crash $ID"
cp $BUG bug.ssa
$QBE bug.ssa > /dev/null
RET=$?
if test \( $RET -ne 0 \) -a \( $RET -ne 1 \)
then
exit 1
fi
expr $ID + 1 > $BUGF
done