]> git.dujemihanovic.xyz Git - nameless-os.git/commitdiff
kernel: Enable -O2 and LTO again mm
authorDuje Mihanović <duje.mihanovic@skole.hr>
Wed, 3 Jul 2024 17:18:44 +0000 (19:18 +0200)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Wed, 3 Jul 2024 17:18:44 +0000 (19:18 +0200)
For some reason this makes exception handling work again.

kernel/Makefile

index 8bb12d83f070c44c38e33bdaf5001336f6844c46..0290ee11eda0df03ad558bc69c4d7fab590ca8bc 100644 (file)
@@ -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 $@