From d5ee99bbd7a278b668cab78341acc83b28ac3eaf Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Tue, 9 Apr 2019 20:25:04 -0500 Subject: [PATCH] riscv64: Ensure kernel is medany code model Change-Id: I1b3386a072811bd068ab44190d16697dc7aad028 --- build/jam/ArchitectureRules | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index 271be6cff4..501287a6ff 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -436,6 +436,12 @@ rule KernelArchitectureSetup architecture HAIKU_KERNEL_CCFLAGS += -mtune=68020-60 ; HAIKU_KERNEL_C++FLAGS += -mtune=68020-60 ; + case riscv64 : + # Kernel lives within any single 2 GiB address space. + # Default is medlow (-2GiB / +2GiB) + HAIKU_KERNEL_CCFLAGS += -mcmodel=medany ; + HAIKU_KERNEL_C++FLAGS += -mcmodel=medany ; + case x86 : HAIKU_KERNEL_CCFLAGS += -march=pentium ; HAIKU_KERNEL_C++FLAGS += -march=pentium ;