diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-06-07 21:30:44 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-06-07 21:30:44 +0300 |
| commit | 4b3799eaf4b7ef32eaf40910a7abf2719ce0fa6c (patch) | |
| tree | eac1123f5bb8e0d21c1b729b6f10a11c9238a67d /arch/riscv64 | |
| parent | 05989b29c70690ff3766ba8323f648f3cf03440c (diff) | |
| download | kmi-4b3799eaf4b7ef32eaf40910a7abf2719ce0fa6c.tar.gz kmi-4b3799eaf4b7ef32eaf40910a7abf2719ce0fa6c.zip | |
slight improvements to building
+ User can now specify debug, release and assert handling
Diffstat (limited to 'arch/riscv64')
| -rw-r--r-- | arch/riscv64/asm/source.mk | 2 | ||||
| -rw-r--r-- | arch/riscv64/source.mk | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv64/asm/source.mk b/arch/riscv64/asm/source.mk index 86cd367..be17c20 100644 --- a/arch/riscv64/asm/source.mk +++ b/arch/riscv64/asm/source.mk @@ -14,7 +14,7 @@ $(OFFSET_HEADER): $(OFFSET_SOURCE) echo " * @file asm-offsets.h" >> $(OFFSET_HEADER) echo " * This comment is also to shut up warnings." >> $(OFFSET_HEADER) echo " */" >> $(OFFSET_HEADER) - $(COMPILER) $(CFLAGS) $(INCLUDE_FLAGS) -S $(OFFSET_SOURCE) -o - |\ + $(COMPILER) $(ARCH_CFLAGS) $(INCLUDE_FLAGS) -S $(OFFSET_SOURCE) -o - |\ awk '($$1 == "#->") { print "#define " $$2 " " $$3 }' >> $(OFFSET_HEADER) echo "#endif /* KMI_ASM_OFFSETS_H */" >> $(OFFSET_HEADER) diff --git a/arch/riscv64/source.mk b/arch/riscv64/source.mk index 502b1f4..e4c1f10 100644 --- a/arch/riscv64/source.mk +++ b/arch/riscv64/source.mk @@ -3,12 +3,12 @@ KERNEL_SOURCES += $(KERNEL_LOCAL) INIT_SOURCES += $(ARCH_SOURCE)/init/*.[cS] # this doesn't work for rv32, but fine for now */ -ARCH_CFLAGS := -mcmodel=medany +ARCH_CFLAGS += -mcmodel=medany # oof, LLVM's riscv support has become better since I last looked into # it, but for some reason LTO still causes a crash. Meaning it has to be # disabled again, though for a different reason than last time -DEBUGFLAGS != [ $(LLVM) ] && echo $(DEBUGFLAGS:-flto=) || echo $(DEBUGFLAGS) +OPTFLAGS != [ "$(LLVM)" != "0" ] && echo $(OPTFLAGS:-flto=) || echo $(OPTFLAGS) run: $(ARCH_SOURCE)/conf/mkimage.sh $(ARCH) |
