From d5ee175d98027e91e2dde0b6cd0c09e6bd92d25c Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Thu, 4 Apr 2019 19:17:09 +0000 Subject: [PATCH] libroot/riscv64: Add missing sigjmp's. Change-Id: Id353f86571ddf5bc106af7c77f0bd3d22b5b7cbd Reviewed-on: https://review.haiku-os.org/c/1381 Reviewed-by: Adrien Destugues --- src/system/kernel/lib/arch/riscv64/Jamfile | 4 ++-- src/system/libroot/posix/arch/riscv64/Jamfile | 4 ++-- .../libroot/posix/arch/riscv64/siglongjmp.S | 20 +++++++++++++++++++ .../libroot/posix/arch/riscv64/sigsetjmp.S | 13 ++++++++++++ 4 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 src/system/libroot/posix/arch/riscv64/siglongjmp.S create mode 100644 src/system/libroot/posix/arch/riscv64/sigsetjmp.S diff --git a/src/system/kernel/lib/arch/riscv64/Jamfile b/src/system/kernel/lib/arch/riscv64/Jamfile index 3ffd75a931..bf5138168a 100644 --- a/src/system/kernel/lib/arch/riscv64/Jamfile +++ b/src/system/kernel/lib/arch/riscv64/Jamfile @@ -22,8 +22,8 @@ SEARCH_SOURCE += [ FDirName $(posixSources) string arch generic ] ; SEARCH_SOURCE += [ FDirName $(posixSources) string arch $(TARGET_ARCH) ] ; KernelMergeObject kernel_lib_posix_arch_$(TARGET_ARCH).o : - #siglongjmp.S - #sigsetjmp.S + siglongjmp.S + sigsetjmp.S kernel_longjmp_return.c kernel_setjmp_save_sigs.c diff --git a/src/system/libroot/posix/arch/riscv64/Jamfile b/src/system/libroot/posix/arch/riscv64/Jamfile index 5a8d678ea7..7ee7d1ba29 100644 --- a/src/system/libroot/posix/arch/riscv64/Jamfile +++ b/src/system/libroot/posix/arch/riscv64/Jamfile @@ -12,8 +12,8 @@ for architectureObject in [ MultiArchSubDirSetup riscv64 ] { MergeObject <$(architecture)>posix_arch_$(TARGET_ARCH).o : fenv.c - #sigsetjmp.S - #siglongjmp.S + sigsetjmp.S + siglongjmp.S $(genericSources) ; diff --git a/src/system/libroot/posix/arch/riscv64/siglongjmp.S b/src/system/libroot/posix/arch/riscv64/siglongjmp.S new file mode 100644 index 0000000000..824600d984 --- /dev/null +++ b/src/system/libroot/posix/arch/riscv64/siglongjmp.S @@ -0,0 +1,20 @@ +/* + * Copyright 2019, Adrien Destugues, pulkomandy@pulkomandy.tk + * Distributed under the terms of the MIT License. + */ + + +#include + + +/* int __siglongjmp(jmp_buf buffer, int value) */ +FUNCTION(siglongjmp): +FUNCTION(longjmp): +FUNCTION(_longjmp): + ret +FUNCTION_END(siglongjmp) +FUNCTION_END(longjmp) +FUNCTION_END(_longjmp) + +#pragma weak longjmp=siglongjmp + diff --git a/src/system/libroot/posix/arch/riscv64/sigsetjmp.S b/src/system/libroot/posix/arch/riscv64/sigsetjmp.S new file mode 100644 index 0000000000..594f881460 --- /dev/null +++ b/src/system/libroot/posix/arch/riscv64/sigsetjmp.S @@ -0,0 +1,13 @@ +/* Copyright 2019, Adrien Destugues, pulkomandy@pulkomandy.tk. + * Distributed under the terms of the MIT License. + */ + + +#include + + +/* int setjmp(jmp_buf buffer) */ +FUNCTION(setjmp): +FUNCTION(_setjmp): + ret +FUNCTION_END(setjmp)