From 2a851b52f15324ffa49feeb9753d40fdb95475e6 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 31 Jul 2023 22:31:17 +0300 Subject: [PATCH] BuildSystem: Edit build flags regarding sse and warnings --- kernel/CMakeLists.txt | 2 +- libc/CMakeLists.txt | 2 ++ userspace/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index a527569285..c9a69f5cec 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(kernel PUBLIC -O2 -g) target_compile_options(kernel PUBLIC -Wno-literal-suffix) target_compile_options(kernel PUBLIC -fno-rtti -fno-exceptions) target_compile_options(kernel PUBLIC -fmacro-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.) -target_compile_options(kernel PUBLIC -fstack-protector -ffreestanding -Wall -Wextra -Werror=return-type -Wstack-usage=1024 -fno-omit-frame-pointer -mno-sse -mno-sse2) +target_compile_options(kernel PUBLIC -fstack-protector -ffreestanding -Wall -Wextra -Werror=return-type -Wstack-usage=1024 -fno-omit-frame-pointer -mgeneral-regs-only) if(ENABLE_KERNEL_UBSAN) target_compile_options(kernel PUBLIC -fsanitize=undefined) diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt index d11defbdc1..1287c4a0bb 100644 --- a/libc/CMakeLists.txt +++ b/libc/CMakeLists.txt @@ -30,6 +30,8 @@ add_custom_target(libc-headers add_library(libc ${LIBC_SOURCES}) add_dependencies(libc headers crt0) +target_compile_options(libc PUBLIC -g -Wstack-usage=512) + add_custom_target(libc-install COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libc.a ${BANAN_LIB}/ DEPENDS libc diff --git a/userspace/CMakeLists.txt b/userspace/CMakeLists.txt index f71e801724..0e761a5f04 100644 --- a/userspace/CMakeLists.txt +++ b/userspace/CMakeLists.txt @@ -24,7 +24,7 @@ add_custom_target(userspace) add_custom_target(userspace-install DEPENDS userspace) foreach(USERSPACE_PROJECT ${USERSPACE_PROJECTS}) - target_compile_options(${USERSPACE_PROJECT} PUBLIC -mno-sse -mno-sse2) + target_compile_options(${USERSPACE_PROJECT} PUBLIC -g) add_dependencies(userspace ${USERSPACE_PROJECT}) add_dependencies(userspace-install ${USERSPACE_PROJECT}-install) endforeach()