From ffa6236243dcdeb8392716bb7b64b93675e57195 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Mon, 28 Nov 2022 15:56:56 +0100 Subject: [PATCH] Build with zmmul extension (require clang 15) Signed-off-by: Daniel Lublin --- doc/toolchain_setup.md | 10 +++++----- hw/application_fpga/Makefile | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/toolchain_setup.md b/doc/toolchain_setup.md index 473e360..333907b 100644 --- a/doc/toolchain_setup.md +++ b/doc/toolchain_setup.md @@ -61,11 +61,11 @@ You can read [more](https://www.sifive.com/blog/all-aboard-part-1-compiler-args) about it. -The project uses the LLVM/Clang suite, where version 14 is the latest -stable (as of writing). Usually the LLVM/Clang packages that are part -of your distro will work, if not, there are installations instructions -for "Install (stable branch)" at https://apt.llvm.org/ for Debian and -Ubuntu. +The project uses the LLVM/Clang suite and version 15 or later is +required. As of writing Ubuntu 22.10 has version 15 packaged. You may +be able to get it installed on older Ubuntu and Debian using the +instructions on https://apt.llvm.org/ . There are also binary releases +here: https://github.com/llvm/llvm-project/releases References: * https://github.com/YosysHQ/picorv32 diff --git a/hw/application_fpga/Makefile b/hw/application_fpga/Makefile index 9ab2a00..f2b2f1d 100644 --- a/hw/application_fpga/Makefile +++ b/hw/application_fpga/Makefile @@ -33,12 +33,12 @@ OBJCOPY ?= llvm-objcopy CC = clang -CFLAGS = -target riscv32-unknown-none-elf -march=rv32imc -mabi=ilp32 \ +CFLAGS = -target riscv32-unknown-none-elf -march=rv32iczmmul -mabi=ilp32 \ -static -std=gnu99 -Os -ffast-math -fno-common -fno-builtin-printf \ -fno-builtin-putchar -nostdlib -mno-relax -Wall -flto -DNOCONSOLE AS = clang -ASFLAGS = -target riscv32-unknown-none-elf -march=rv32imc -mabi=ilp32 -mno-relax +ASFLAGS = -target riscv32-unknown-none-elf -march=rv32iczmmul -mabi=ilp32 -mno-relax ICE40_SIM_CELLS = $(shell yosys-config --datdir/ice40/cells_sim.v)