From 034762e7caf8e8aa8ad20cf1a81c9582876e14d6 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 19 Sep 2020 23:28:47 +0200 Subject: Wrroooooooom, I'm faster. ig --- kernel/Makefile | 3 +-- kernel/drivers/ide.c | 2 +- libc/Makefile | 2 +- libtxt/keymap.c | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index 1487ae3..e14d04e 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -21,8 +21,7 @@ LD = ../cross/opt/bin/i686-elf-ld OC = ../cross/opt/bin/i686-elf-objcopy AS = nasm -# TODO: Fix -Ofast (probably some dumb memory overflow bug) -CFLAGS = -Wall -Wextra -nostdlib -nostdinc -ffreestanding -fno-builtin -fno-asynchronous-unwind-tables -mno-red-zone -mgeneral-regs-only -mpreferred-stack-boundary=2 -std=c99 -m32 -pedantic-errors -Wl,-ekernel_main -I../libc/inc/ -Iinc/ -Dkernel -O0 +CFLAGS = -Wall -Wextra -nostdlib -nostdinc -ffreestanding -fno-builtin -mno-red-zone -mgeneral-regs-only -std=c99 -m32 -pedantic-errors -Wl,-ekernel_main -I../libc/inc/ -Iinc/ -Dkernel -Ofast ASFLAGS = -f elf32 diff --git a/kernel/drivers/ide.c b/kernel/drivers/ide.c index fe3955c..d637a2b 100644 --- a/kernel/drivers/ide.c +++ b/kernel/drivers/ide.c @@ -18,7 +18,7 @@ int ide_wait(int check) return 0; } -void *ide_read(void *b, u32 block) +void __attribute__((optimize("O0"))) * ide_read(void *b, u32 block) { int sector_per_block = BLOCK_SIZE / SECTOR_SIZE; // 2 int sector = block * sector_per_block; diff --git a/libc/Makefile b/libc/Makefile index 39ab1b4..f6cddbc 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -16,7 +16,7 @@ LD = ../cross/opt/bin/i686-elf-ld AR = ../cross/opt/bin/i686-elf-ar AS = nasm -CFLAGS = -Wall -Wextra -nostdlib -nostdinc -fno-builtin -fno-asynchronous-unwind-tables -mno-red-zone -mgeneral-regs-only -mpreferred-stack-boundary=2 -std=c99 -m32 -pedantic-errors -Iinc/ -Ofast +CFLAGS = -Wall -Wextra -nostdlib -nostdinc -fno-builtin -mgeneral-regs-only -std=c99 -m32 -pedantic-errors -Iinc/ -Ofast ASFLAGS = -f elf32 diff --git a/libtxt/keymap.c b/libtxt/keymap.c index e05ef1d..70af4fa 100644 --- a/libtxt/keymap.c +++ b/libtxt/keymap.c @@ -29,7 +29,6 @@ struct keymap *keymap_parse(const char *path) char *keymap_src = read(path); if (!keymap_src) return NULL; - printf("%c\n", keymap_src[0]); struct keymap *keymap = malloc(sizeof(*keymap)); int index = 0; -- cgit v1.2.3