feat: refactor to use gcc types

This commit is contained in:
2021-02-12 22:16:03 +01:00
parent 555c1177a6
commit 8f615b259c
33 changed files with 419 additions and 361 deletions

View File

@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.15)
project(new_kernel C ASM)
#set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_C_FLAGS "-g -ffreestanding -Wall -Wextra -fno-exceptions -fno-stack-protector -nostdinc -nostdlib -fno-pie -m32")
set(CMAKE_ASM_NASM_OBJECT_FORMAT "elf")
set(CMAKE_C_FLAGS "-I/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include -g -ffreestanding -Wall -Wextra -fno-exceptions -fno-stack-protector -nostdinc -nostdlib -fno-pie -m32")
#set(CMAKE_ASM_NASM_OBJECT_FORMAT "elf")
set(CMAKE_ASM_FLAGS --32)
#set(CMAKE_ASM-ATT_FLAGS --32)
SET(CMAKE_EXE_LINKER_FLAGS "-T${CMAKE_CURRENT_LIST_DIR}/linker.ld -lgcc -ffreestanding -nostdlib")
@@ -11,6 +11,7 @@ set(CMAKE_ASM_COMPILER "/usr/bin/as")
#enable_language(ASM)
include_directories(AFTER kernel boot)
include_directories("/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include")
set(CMAKE_C_STANDARD 99)
@@ -25,3 +26,4 @@ set_source_files_properties(${kernel_src} PROPERTIES LANGUAGE C COMPILE_FLAGS ""
set_target_properties(my-kernel.bin PROPERTIES LINKER_LANGUAGE C PREFIX "" SUFFIX "" LINK_FLAGS "")