]> git.dujemihanovic.xyz Git - nameless-os.git/commitdiff
kernel, stage3: Disable -O2 and -flto, enable -Og
authorDuje Mihanović <duje.mihanovic@skole.hr>
Sat, 2 Jul 2022 12:26:41 +0000 (14:26 +0200)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Sat, 2 Jul 2022 12:26:41 +0000 (14:26 +0200)
This effectively reverts commit 99a0307 ("kernel, stage3: Enable -O2 and LTO by
default") and instead enables -Og to aid in debugging.

boot/x86/stage3/Makefile
kernel/Makefile

index b5b02f0d7658a57b74afdd64422848cf53623c19..cfe2189dbef18e5152972d6b01d4e354fa759d31 100644 (file)
@@ -2,7 +2,7 @@ STAGE3_OBJ = loader.o elf.o paging.o prekernel.o
 
 ASFLAGS_BASE = -f elf -g dwarf2 -DGIT_REVISION=\"$(GIT_REV)\"
 CFLAGS_BASE = -ffreestanding -nostdlib -DGIT_REVISION=\"$(GIT_REV)\" -g \
-             -O2 -flto
+             -Og
 LDFLAGS_BASE = -ffreestanding -nostdlib -g -lgcc -T stage3.ld -flto
 
 default: LOADER.BIN loader.elf
index 821e4942fbe3efb630685a8cfc271212606255c3..b510e802636d9de0a49ce5ce27d0d10dd85f6948 100644 (file)
@@ -5,7 +5,7 @@ include kernel/Makefile
 ASFLAGS_BASE = -f elf -g dwarf2
 CFLAGS_BASE = -fgnu89-inline -ffreestanding -nostdlib -Iinclude \
              -Iinclude/arch/x86 -g -DGIT_COMMIT=\"$(GIT_REV)\" \
-             -O2 -flto
+             -Og
 LDFLAGS_BASE = -ffreestanding -nostdlib -lgcc -g -flto -T arch/x86/linker.ld
 
 kernel.elf kernel.dbg: $(KERNEL_OBJ)