From c8abe9e1aa396609a6457e3ddb57f3cb0b656d4a Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Mon, 1 Sep 2025 23:05:23 +0200 Subject: [PATCH 1/2] Put bool into stdbool.h --- kern/libkern/stdbool.h | 8 ++++++++ kern/libkern/stdint.h | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 kern/libkern/stdbool.h diff --git a/kern/libkern/stdbool.h b/kern/libkern/stdbool.h new file mode 100644 index 0000000..1bab927 --- /dev/null +++ b/kern/libkern/stdbool.h @@ -0,0 +1,8 @@ +#ifndef _STDBOOL_H +#define _STDBOOL_H + +/*TODO*/ +typedef char bool; +enum { false = 0, true = 1 }; + +#endif diff --git a/kern/libkern/stdint.h b/kern/libkern/stdint.h index 69e74d4..0ce4c00 100644 --- a/kern/libkern/stdint.h +++ b/kern/libkern/stdint.h @@ -12,5 +12,3 @@ typedef unsigned long uint64_t; typedef uint64_t size_t; typedef uint64_t uintptr_t; - -typedef u8 bool; From 23a41dfbdd4b28e8601f19a5d941e0167acc4ead Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Mon, 1 Sep 2025 23:05:31 +0200 Subject: [PATCH 2/2] Split some cflags --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8621d11..1496c7f 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,10 @@ CFLAGS = -Wall -Werror -O CFLAGS += -Wno-unused-result CFLAGS += -mcmodel=medany CFLAGS += -march=rv64gc -mabi=lp64 -CFLAGS += -ffreestanding -fno-common -nostdlib -mno-relax +CFLAGS += -ffreestanding +CFLAGS += -fno-common +CFLAGS += -nostdlib +CFLAGS += -mno-relax CFLAGS += -fno-stack-protector # Prevents code that needs libc / runtime support CFLAGS += -MD # Generate header dependency files (.d)