diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-30 18:52:55 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-30 18:52:55 +0300 |
| commit | 5cc76c436fa1234323bad51d72d1291d95991da6 (patch) | |
| tree | 96b419bbae611d7f1ed20ba2447bfbbb553c684a | |
| parent | 712a15ce6c5fdf9c5156a5954cd6c3551547037c (diff) | |
| download | kmi-5cc76c436fa1234323bad51d72d1291d95991da6.tar.gz kmi-5cc76c436fa1234323bad51d72d1291d95991da6.zip | |
specify mabi and march
| -rw-r--r-- | arch/riscv64/source.mk | 2 | ||||
| -rw-r--r-- | tests/common/arch/riscv64/source.mk | 1 | ||||
| -rw-r--r-- | tests/scripts/makefile | 6 |
3 files changed, 6 insertions, 3 deletions
diff --git a/arch/riscv64/source.mk b/arch/riscv64/source.mk index f849432..54fcb08 100644 --- a/arch/riscv64/source.mk +++ b/arch/riscv64/source.mk @@ -2,7 +2,7 @@ KERNEL_LOCAL != echo $(ARCH_SOURCE)/kernel/*.[cS] KERNEL_SOURCES := $(KERNEL_SOURCES) $(KERNEL_LOCAL) # this doesn't work for rv32, but fine for now */ -ARCH_CFLAGS := $(ARCH_CFLAGS) -mcmodel=medany +ARCH_CFLAGS := $(ARCH_CFLAGS) -mcmodel=medany -march=rv64imac_zicsr -mabi=lp64 include $(ARCH_SOURCE)/asm/source.mk diff --git a/tests/common/arch/riscv64/source.mk b/tests/common/arch/riscv64/source.mk new file mode 100644 index 0000000..517c1c7 --- /dev/null +++ b/tests/common/arch/riscv64/source.mk @@ -0,0 +1 @@ +ARCH_FLAGS += -march=rv64imac -mabi=lp64 diff --git a/tests/scripts/makefile b/tests/scripts/makefile index 7b861e2..ed2b2b4 100644 --- a/tests/scripts/makefile +++ b/tests/scripts/makefile @@ -9,11 +9,13 @@ COMPILER != [ "$(LLVM)" != "0" ] \ && echo clang --target="$(CROSS_COMPILE)" \ || echo $(CROSS_COMPILE)gcc -OBFLAGS := -ffreestanding -nostdlib -std=c17 -g +include common/arch/$(ARCH)/source.mk + +OBFLAGS := -ffreestanding -nostdlib -std=c17 -g -O2 INCLUDEFLAGS := -I ../include -I. WARNFLAGS := -Wall -Wextra DEPFLAGS = -MT $@ -MMD -MP -MF $@.d -COMPILE_TEST = $(COMPILER) $(WARNFLAGS) $(INCLUDEFLAGS) $(DEPFLAGS) $(OBFLAGS) +COMPILE_TEST = $(COMPILER) $(WARNFLAGS) $(INCLUDEFLAGS) $(DEPFLAGS) $(OBFLAGS) $(ARCH_FLAGS) GEN_INITRD := cpio -H newc -o > QEMU := qemu-system-$(ARCH) -machine virt -kernel ../kmi.bin \ |
