BuildSystem: Edit build flags regarding sse and warnings

This commit is contained in:
Bananymous 2023-07-31 22:31:17 +03:00
parent 8b1bccb79b
commit 679d47131d
3 changed files with 4 additions and 2 deletions

View File

@ -125,7 +125,7 @@ target_compile_options(kernel PUBLIC -O2 -g)
target_compile_options(kernel PUBLIC -Wno-literal-suffix) target_compile_options(kernel PUBLIC -Wno-literal-suffix)
target_compile_options(kernel PUBLIC -fno-rtti -fno-exceptions) 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 -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) if(ENABLE_KERNEL_UBSAN)
target_compile_options(kernel PUBLIC -fsanitize=undefined) target_compile_options(kernel PUBLIC -fsanitize=undefined)

View File

@ -30,6 +30,8 @@ add_custom_target(libc-headers
add_library(libc ${LIBC_SOURCES}) add_library(libc ${LIBC_SOURCES})
add_dependencies(libc headers crt0) add_dependencies(libc headers crt0)
target_compile_options(libc PUBLIC -g -Wstack-usage=512)
add_custom_target(libc-install add_custom_target(libc-install
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libc.a ${BANAN_LIB}/ COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libc.a ${BANAN_LIB}/
DEPENDS libc DEPENDS libc

View File

@ -24,7 +24,7 @@ add_custom_target(userspace)
add_custom_target(userspace-install DEPENDS userspace) add_custom_target(userspace-install DEPENDS userspace)
foreach(USERSPACE_PROJECT ${USERSPACE_PROJECTS}) 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 ${USERSPACE_PROJECT})
add_dependencies(userspace-install ${USERSPACE_PROJECT}-install) add_dependencies(userspace-install ${USERSPACE_PROJECT}-install)
endforeach() endforeach()