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/img/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=659249438ba9ad82b174cf926c251f35d501be63;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 $@