1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:17:34 +00:00

LibC: Separate arch dependent fenv functions

Remove all functions with platform #if's from fenv, and
add arch dependent implementations instead. The build
system now selects the implementation based on the platform.
This commit is contained in:
Tom Finet 2024-01-21 13:59:05 +00:00 committed by Andrew Kaster
parent 9a207da368
commit 900ec37f81
6 changed files with 405 additions and 268 deletions

View file

@ -99,17 +99,19 @@ endforeach()
file(GLOB ELF_SOURCES CONFIGURE_DEPENDS "../LibELF/*.cpp")
if ("${SERENITY_ARCH}" STREQUAL "aarch64")
set(LIBC_SOURCES ${LIBC_SOURCES} "arch/aarch64/fenv.cpp")
set(ASM_SOURCES "arch/aarch64/setjmp.S")
set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/aarch64/entry.S ../LibELF/Arch/aarch64/plt_trampoline.S ../LibELF/Arch/aarch64/tls.S)
set(CRTI_SOURCE "arch/aarch64/crti.S")
set(CRTN_SOURCE "arch/aarch64/crtn.S")
elseif ("${SERENITY_ARCH}" STREQUAL "x86_64")
set(LIBC_SOURCES ${LIBC_SOURCES} "arch/x86_64/memset.cpp")
set(LIBC_SOURCES ${LIBC_SOURCES} "arch/x86_64/memset.cpp" "arch/x86_64/fenv.cpp")
set(ASM_SOURCES "arch/x86_64/setjmp.S" "arch/x86_64/memset.S")
set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/x86_64/entry.S ../LibELF/Arch/x86_64/plt_trampoline.S)
set(CRTI_SOURCE "arch/x86_64/crti.S")
set(CRTN_SOURCE "arch/x86_64/crtn.S")
elseif ("${SERENITY_ARCH}" STREQUAL "riscv64")
set(LIBC_SOURCES ${LIBC_SOURCES} "arch/riscv64/fenv.cpp")
set(ASM_SOURCES "arch/riscv64/setjmp.S")
set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/riscv64/entry.S ../LibELF/Arch/riscv64/plt_trampoline.S)
set(CRTI_SOURCE "arch/riscv64/crti.S")