Fix running on bochs by forcing x86 pentium codegen

This commit is contained in:
2025-12-07 14:48:27 +01:00
parent 69dde0bf6a
commit 4b94ea7a41
8 changed files with 18 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
clang_res_dir := $(shell $(cc) -print-resource-dir)
kernel_cflags := --target=i386-none-elf \
-march=pentium \
-nostdinc \
-nostdlib \
-ffreestanding \
@@ -8,7 +9,8 @@ kernel_cflags := --target=i386-none-elf \
-std=c11 \
-pedantic \
-Wall \
-Wextra
-Wextra \
-ffunction-sections -fdata-sections
ifeq ($(build),debug)
kernel_cflags += -O0 -g
@@ -27,6 +29,8 @@ kernel_ldflags := -mcpu=i386 \
-flto \
-static \
-Wl,--build-id=none \
-Wl,--gc-sections \
-Wl,--strip-all \
$(clang_res_dir)/lib/*/libclang_rt.builtins-i386.a
ifeq ($(build),debug)