From: Duje Mihanović Date: Wed, 3 Jul 2024 17:18:44 +0000 (+0200) Subject: kernel: Enable -O2 and LTO again X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=commitdiff_plain;h=659249438ba9ad82b174cf926c251f35d501be63;hp=fb402cd052e9b9e9eaf30a7c14244a00e3cfe42a;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 $@