userspace: Allow building without SSE

I had added changes that had broken compilation without sse support
This commit is contained in:
2024-09-02 21:25:00 +03:00
parent 700c3444f5
commit 5f92807fdd
9 changed files with 45 additions and 6 deletions

View File

@@ -15,9 +15,14 @@ add_custom_target(libraries)
foreach(library ${USERSPACE_LIBRARIES})
string(TOLOWER ${library} library_lower)
if (TARGET ${library_lower})
if (TARGET ${library_lower} AND NOT ${library_lower} STREQUAL "libc")
add_dependencies(libraries ${library_lower})
# This is to allow cmake to link when libc updates
target_link_options(${library_lower} PRIVATE -nolibc)
target_compile_definitions(${library_lower} PRIVATE __enable_sse=${BANAN_ENABLE_SSE})
if (NOT BANAN_ENABLE_SSE)
target_compile_options(${library_lower} PRIVATE -mno-sse -mno-sse2)
endif ()
endif()
endforeach()