From 6e84dc968bc4eaf047fbefcba2f670940718dda8 Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Mon, 9 Nov 2020 11:36:14 +0000 Subject: Add toolchain for riscv (ia ic il) and riscv64 (ja jc jl) Because the rv64 ISA is very nearly a proper superset of rv32, the compilers ic and jc are actually the same program, which compiles to .i or .j depending on how it is invoked; similarly for ia/ja and il/jl. It is also possible to invoke ia/ic/il with a '-j' option to specify 64-bit behaviour. --- utils/ia/mkfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 utils/ia/mkfile (limited to 'utils/ia/mkfile') diff --git a/utils/ia/mkfile b/utils/ia/mkfile new file mode 100644 index 00000000..05ccc4dc --- /dev/null +++ b/utils/ia/mkfile @@ -0,0 +1,31 @@ +<../../mkconfig + +TARG=ia # also makes ja (for riscv64) + +OFILES=\ + y.tab.$O\ + lex.$O\ + +HFILES=\ + ../ic/i.out.h\ + y.tab.h\ + a.h\ + +YFILES=a.y\ + +LIBS=cc bio 9 # order is important + +BIN=$ROOT/$OBJDIR/bin +<$ROOT/mkfiles/mkone-$SHELLTYPE + +YFLAGS=-D1 -d +CFLAGS= $CFLAGS -I../include + +lex.$O: ../cc/macbody ../cc/lexbody + +$ROOT/$OBJDIR/lib/libcc.a: + cd ../cc + mk $MKFLAGS install + mk $MKFLAGS clean + +install:V: $BIN/ja -- cgit v1.2.3