diff options
-rwxr-xr-x | build.sh | 8 | ||||
-rw-r--r-- | std/io.toc | 2 | ||||
-rw-r--r-- | test.toc | 8 |
3 files changed, 9 insertions, 9 deletions
@@ -30,7 +30,7 @@ else fi [ "$ARCH" = "" ] && ARCH="$(uname -m)" - +[ "$ARCH" = "amd64" ] && ARCH=x86_64 if [ "$COMPILE_TIME_FOREIGN_FN_SUPPORT" != "no" ]; then uname | grep -qi bsd || LIBRARIES="$LIBRARIES -ldl" @@ -59,6 +59,8 @@ c() { echo "$1" && $1 || exit 1 } -[ ! -f systemv64call.o ] && c "$NASM -f elf64 systemv64call.asm" -c "$CC $FLAGS -o toc main.c systemv64call.o" +[ "$ARCH" = "x86_64" ] && [ ! -f systemv64call.o ] && c "$NASM -f elf64 systemv64call.asm" +SOURCES=main.c +[ "$ARCH" = "x86_64" ] && SOURCES="$SOURCES systemv64call.o" +c "$CC $FLAGS -o toc $SOURCES" @@ -53,7 +53,7 @@ puti ::= fn(x: int) { writef ::= fn(x: float) { fmt := "%f\0"; - printf(&fmt[0], x); + printf(&fmt[0], x as f64); } putf ::= fn(x: float) { writef(x); @@ -1,9 +1,7 @@ #include "std/io.toc", io; +#include "std/base.toc", base; main ::= fn() { - #warn("foo"); #no_warn - x := 0 as ∫ #no_warn - #warn("foo"); #no_warn - #warn("foo"); #no_warn - #warn("foo"); #no_warn + io.putf(3.7); } +main(); |