aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcapture.sh3
-rwxr-xr-xextract-function-header.sh3
-rwxr-xr-xextract-function.sh7
-rwxr-xr-xsrc/Specific/X25519/C64/compiler.sh4
4 files changed, 14 insertions, 3 deletions
diff --git a/capture.sh b/capture.sh
index 8e0455713..c41ee167d 100755
--- a/capture.sh
+++ b/capture.sh
@@ -1,4 +1,7 @@
#!/bin/sh
+set -e || true
+set -u || true
+set -o pipefail || true
machine=$(etc/machine.sh)
measurement=$($1/measure | (LC_ALL=C sort -n || true) | head -1024 | tail -1)
diff --git a/extract-function-header.sh b/extract-function-header.sh
index e0db91ac9..a93fb52f8 100755
--- a/extract-function-header.sh
+++ b/extract-function-header.sh
@@ -1,4 +1,7 @@
#!/bin/sh
+set -e || true
+set -u || true
+set -o pipefail || true
case "$#" in
0)
diff --git a/extract-function.sh b/extract-function.sh
index 4056f242c..c2deef7f2 100755
--- a/extract-function.sh
+++ b/extract-function.sh
@@ -1,4 +1,7 @@
#!/bin/sh
+set -e || true
+set -u || true
+set -o pipefail || true
case "$#" in
0)
@@ -46,7 +49,7 @@ while IFS= read -r line; do
sed 's:return::g' | sed 's:Return::g' | tr -d '(' | tr -d ')' | tr , '\n' | sed 's/^\s\+//g' | \
( while IFS= read -r ret; do
echo "out[$i] = $ret;"
- ((i++))
+ i=$((i+1))
done;
seq 2 "$lines" | while IFS= read -r _; do
echo -n "}"
@@ -59,7 +62,7 @@ while IFS= read -r line; do
*)
case "$show" in
true)
- ((lines++))
+ lines=$((lines+1))
echo "{ $line" | \
sed s':^\([^,]*\) \([^, ]*\)\(\s*\),\(.*\)\(addcarryx.*\))\([; ]*\)$:\1 \2\3;\4_\5, \&\2)\6:' | \
sed s':^\([^,]*\) \([^, ]*\)\(\s*\),\(.*\)\(subborrow.*\))\([; ]*\)$:\1 \2\3;\4_\5, \&\2)\6:'
diff --git a/src/Specific/X25519/C64/compiler.sh b/src/Specific/X25519/C64/compiler.sh
index eb6c09eba..b05a73567 100755
--- a/src/Specific/X25519/C64/compiler.sh
+++ b/src/Specific/X25519/C64/compiler.sh
@@ -1,4 +1,6 @@
#!/bin/sh
-set -euo pipefail
+set -e || true
+set -u || true
+set -o pipefail || true
gcc -march=native -mtune=native -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes $@