Working kernel written on C and userspace-ready #1

Merged
sonya merged 61 commits from dev into main 2026-05-03 09:13:20 +00:00
Showing only changes of commit a3dc3054b8 - Show all commits
+5 -4
View File
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20)
project(ksOSKernel LANGUAGES ASM C) project(ksOSKernel LANGUAGES ASM C)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
file(GLOB_RECURSE KERNEL_SOURCES CMAKE_CONFIGURE_DEPENDS file(GLOB_RECURSE KERNEL_SOURCES CMAKE_CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/Source/KernelMain.c ${CMAKE_CURRENT_SOURCE_DIR}/Source/KernelMain.c
${CMAKE_CURRENT_SOURCE_DIR}/Source/Arch/entry.S ${CMAKE_CURRENT_SOURCE_DIR}/Source/Arch/entry.S
${CMAKE_CURRENT_SOURCE_DIR}/Source/Arch/vectors.S ${CMAKE_CURRENT_SOURCE_DIR}/Source/Arch/vectors.S
@@ -10,24 +10,25 @@ file(GLOB_RECURSE KERNEL_SOURCES CMAKE_CONFIGURE_DEPENDS
) )
add_executable(Kernel ${KERNEL_SOURCES}) add_executable(Kernel ${KERNEL_SOURCES})
target_include_directories(Kernel PRIVATE target_include_directories(Kernel PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Include/ ${CMAKE_CURRENT_SOURCE_DIR}/Include/
${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_SOURCE_DIR}/../Common
) )
target_compile_options(Kernel PRIVATE target_compile_options(Kernel PRIVATE
$<$<COMPILE_LANGUAGE:C>: $<$<COMPILE_LANGUAGE:C>:
-std=c23 -std=c23
-ffreestanding -ffreestanding
-fno-stack-protector -fno-stack-protector
-fno-builtin -fno-builtin
-Wall -Wextra -Wall -Wextra
-Wno-incompatible-library-redeclaration
-g -g
-mgeneral-regs-only -mgeneral-regs-only
> >
) )
target_link_options(Kernel PRIVATE target_link_options(Kernel PRIVATE
-nostdlib -nostdlib
-static -static
-no-pie -no-pie