BuildSystem: Fix enable sse definition

__enable_sse was never actually defined for any targets. This also adds
__arch definition for libc (so `utsname` works).
This commit is contained in:
2024-08-09 15:16:49 +03:00
parent 7e7c3a1bb3
commit 2a659a9d03
3 changed files with 12 additions and 3 deletions

View File

@@ -36,6 +36,12 @@ set(LIBC_SOURCES
)
add_library(libc ${LIBC_SOURCES})
target_compile_definitions(libc PRIVATE __arch=${BANAN_ARCH})
target_compile_definitions(libc PRIVATE __enable_sse=${BANAN_ENABLE_SSE})
if (NOT BANAN_ENABLE_SSE)
target_compile_options(libc PRIVATE -mno-sse -mno-sse2)
endif ()
target_compile_options(libc PRIVATE -O2 -g -Wstack-usage=512 -fno-tree-loop-distribute-patterns -fno-exceptions -nostdlib)
target_compile_options(libc PUBLIC -Wall -Wextra -Werror -Wno-error=stack-usage=)