aboutsummaryrefslogtreecommitdiff
path: root/tests/bench/bench_float.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bench/bench_float.sh')
-rw-r--r--tests/bench/bench_float.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/bench/bench_float.sh b/tests/bench/bench_float.sh
index 794e976..4ebfbe4 100644
--- a/tests/bench/bench_float.sh
+++ b/tests/bench/bench_float.sh
@@ -5,17 +5,19 @@
# this does not bootstrap the compiler. each kernel is poly() of 20000,
# and (int) of one call is 59997.
cd "$(dirname "$0")/../.."
+CC=${CC:-$(sh src/tools/findcc.sh)} || exit 1
+make -s build/core/genome.bin || exit 1
T=$(mktemp -d)
trap 'rm -rf "$T"' EXIT
-gcc -O2 -w -DJTYPE=int src/core/core.c src/core/io_linux.c -Isrc/core -o "$T/zy" || exit 1
+$CC -O2 -w -DJTYPE=int src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o "$T/zy" || exit 1
vms=("$T/zy"); names=("interp")
-gcc -O2 -w src/micro/micro.c src/micro/port_linux.c -Isrc/core -Isrc/micro -o "$T/zym" && { vms+=("$T/zym"); names+=("micro"); }
+$CC -O2 -w src/micro/micro.c src/micro/port_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -Isrc/micro -o "$T/zym" && { vms+=("$T/zym"); names+=("micro"); }
if command -v llvm-config >/dev/null; then
- gcc -O2 -w -DJTYPE=int -DZYLLVM $(llvm-config --cflags) src/core/core.c src/core/io_linux.c -Isrc/core -o "$T/zyl" $(llvm-config --ldflags --libs) \
+ $CC -O2 -w -DJTYPE=int -DZYLLVM $(llvm-config --cflags) src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o "$T/zyl" $(llvm-config --ldflags --libs) \
&& { vms+=("$T/zyl"); names+=("llvm"); }
fi
if command -v aarch64-linux-gnu-gcc >/dev/null && command -v qemu-aarch64 >/dev/null; then
- aarch64-linux-gnu-gcc -O2 -w -DJTYPE=int -static src/core/core.c src/core/io_linux.c -Isrc/core -o "$T/zyj" \
+ aarch64-linux-gnu-gcc -O2 -w -DJTYPE=int -static src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o "$T/zyj" \
&& { vms+=("qemu-aarch64 $T/zyj"); names+=("arm64"); }
fi
src=$(cat tests/programs/fbench.zc)