Skip to content

Commit

Permalink
perf(libc): remove nostdinc
Browse files Browse the repository at this point in the history
Signed-off-by: Zone.N <[email protected]>
  • Loading branch information
MRNIU committed May 17, 2023
2 parents e4bdccc + c3a9073 commit 0e64463
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 738 deletions.
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0")
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}")

# 通用选项
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding -nostdlib -nostdinc -fexceptions -nostartfiles -fPIC -no-pie -Wall -Wextra -MMD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffreestanding -nostdlib -nostdinc -fexceptions -nostartfiles -fPIC -no-pie -Wall -Wextra -MMD")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding -nostdlib -fexceptions -nostartfiles -fPIC -no-pie -Wall -Wextra -MMD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffreestanding -nostdlib -fexceptions -nostartfiles -fPIC -no-pie -Wall -Wextra -MMD")
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}")

# 输出相关信息
Expand Down
2 changes: 2 additions & 0 deletions src/kernel/kernel_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "cstdio"
#include "iostream"
#include "kernel.h"
#include "cstdint"

/**
* @brief 内核主要逻辑
Expand All @@ -31,6 +32,7 @@ void kernel_main(void) {
std::cout << BOOT_INFO::get_memory() << std::endl;
// 显示基本信息
show_info();
bool aaa=false;
// 进入死循环
while (1) {
;
Expand Down
30 changes: 0 additions & 30 deletions src/libc/include/float.h

This file was deleted.

63 changes: 0 additions & 63 deletions src/libc/include/limits.h

This file was deleted.

34 changes: 0 additions & 34 deletions src/libc/include/stdarg.h

This file was deleted.

44 changes: 0 additions & 44 deletions src/libc/include/stdbool.h

This file was deleted.

49 changes: 0 additions & 49 deletions src/libc/include/stddef.h

This file was deleted.

Loading

0 comments on commit 0e64463

Please sign in to comment.