linuxPackages_latest.broadcom_sta: add patch to compile on Kernel 6.12 (#359484)
[NixPkgs.git] / pkgs / by-name / qb / qbe / 001-dont-hardcode-tmp.patch
blob556dc5aab2a6ad5056b6f6689ed7e6ba011baebc
1 diff --git a/minic/mcc b/minic/mcc
2 index 492947e..5258aac 100755
3 --- a/minic/mcc
4 +++ b/minic/mcc
5 @@ -31,9 +31,9 @@ then
6 fi
9 -$DIR/minic < $file > /tmp/minic.ssa &&
10 -$QBE < /tmp/minic.ssa > /tmp/minic.s &&
11 -cc /tmp/minic.s $flags
12 +$DIR/minic < $file > ${TMPDIR:-/tmp}/minic.ssa &&
13 +$QBE < ${TMPDIR:-/tmp}/minic.ssa > ${TMPDIR:-/tmp}/minic.s &&
14 +cc ${TMPDIR:-/tmp}/minic.s $flags
16 if test $? -ne 0
17 then
18 diff --git a/tools/cra.sh b/tools/cra.sh
19 index 5988267..57a4b34 100755
20 --- a/tools/cra.sh
21 +++ b/tools/cra.sh
22 @@ -2,7 +2,7 @@
24 DIR=`cd $(dirname "$0"); pwd`
25 QBE=$DIR/../qbe
26 -BUGF=/tmp/bug.id
27 +BUGF=${TMPDIR:-/tmp}/bug.id
28 FIND=$1
29 FIND=${FIND:-afl-find}
31 diff --git a/tools/test.sh b/tools/test.sh
32 index 23c6663..fb36222 100755
33 --- a/tools/test.sh
34 +++ b/tools/test.sh
35 @@ -4,7 +4,7 @@ dir=`dirname "$0"`
36 bin=$dir/../qbe
37 binref=$dir/../qbe.ref
39 -tmp=/tmp/qbe.zzzz
40 +tmp=${TMPDIR:-/tmp}/qbe.zzzz
42 drv=$tmp.c
43 asm=$tmp.s