From: Duje Mihanović Date: Wed, 3 Jul 2024 17:18:44 +0000 (+0200) Subject: kernel: Enable -O2 and LTO again X-Git-Url: https://git.dujemihanovic.xyz/repo?a=commitdiff_plain;h=refs%2Fheads%2Fmm;p=nameless-os.git kernel: Enable -O2 and LTO again For some reason this makes exception handling work again. --- diff --git a/kernel/Makefile b/kernel/Makefile index 8bb12d8..0290ee1 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -5,8 +5,8 @@ include kernel/Makefile ASFLAGS_BASE = -f elf -g dwarf2 CFLAGS_BASE = -fgnu89-inline -ffreestanding -nostdlib -Iinclude \ -Iinclude/arch/x86 -g -DGIT_COMMIT=\"$(GIT_REV)\" \ - -Og -LDFLAGS_BASE = -ffreestanding -nostdlib -lgcc -g -T arch/x86/linker.ld + -O2 -flto +LDFLAGS_BASE = -ffreestanding -nostdlib -lgcc -g -O2 -flto -T arch/x86/linker.ld kernel.elf kernel.dbg: $(KERNEL_OBJ) $(REAL_CC) $(LDFLAGS_BASE) $(LDFLAGS) $^ -o $@