From ebae2f5a6f971a8f0b6c99e00f9c45ef7433924a Mon Sep 17 00:00:00 2001 From: Matheus Castanho Date: Fri, 9 Apr 2021 14:47:27 -0300 Subject: Add build option to disable usage of scv on powerpc Commit 68ab82f56690ada86ac1e0c46bad06ba189a10ef added support for the scv syscall ABI on powerpc. Since then systems that have kernel and processor support started using scv. However adding the proper support for a new syscall ABI requires changes to several other projects (e.g. qemu, valgrind, strace, kernel), which are gradually receiving support. Meanwhile, having a way to disable scv on glibc at build time can be useful for distros that may encounter conflicts with projects that still do not support the scv ABI, buying time until proper support is added. This commit adds a --disable-scv option that disables scv support and uses sc for all syscalls, like before commit 68ab82f56690ada86ac1e0c46bad06ba189a10ef. Reviewed-by: Raphael M Zinsly --- sysdeps/powerpc/powerpc64/sysdep.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sysdeps/powerpc') diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h index 1ea4c3b..589f7c8 100644 --- a/sysdeps/powerpc/powerpc64/sysdep.h +++ b/sysdeps/powerpc/powerpc64/sysdep.h @@ -306,7 +306,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ beq \JUMPFALSE .endm -#if IS_IN(rtld) +#if !defined(USE_PPC_SCV) || IS_IN(rtld) # define DO_CALL(syscall) \ li r0,syscall; \ DO_CALL_SC @@ -323,7 +323,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ b 1f; \ 0: DO_CALL_SC; \ 1: -#endif /* IS_IN(rtld) */ +#endif /* !defined(USE_PPC_SCV) || IS_IN(rtld) */ /* DO_CALL_SC and DO_CALL_SCV expect the syscall number to be in r0. */ #define DO_CALL_SC \ @@ -378,7 +378,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ .endif #endif -#if IS_IN(rtld) +#if !defined(USE_PPC_SCV) || IS_IN(rtld) # define PSEUDO_RET \ RET_SC; \ TAIL_CALL_SYSCALL_ERROR @@ -395,7 +395,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ b 1f; \ 0: RET_SC; \ 1: TAIL_CALL_SYSCALL_ERROR -#endif +#endif /* !defined(USE_PPC_SCV) || IS_IN(rtld) */ #define RET_SCV \ li r9,-4095; \ @@ -417,7 +417,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ ENTRY (name); \ DO_CALL (SYS_ify (syscall_name)) -#if IS_IN(rtld) +#if !defined(USE_PPC_SCV) || IS_IN(rtld) # define PSEUDO_RET_NOERRNO \ blr #else @@ -425,7 +425,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ # define PSEUDO_RET_NOERRNO \ NVOLREG_RESTORE; \ blr -#endif /* IS_IN(rtld) */ +#endif /* !defined(USE_PPC_SCV) || IS_IN(rtld) */ #define ret_NOERRNO PSEUDO_RET_NOERRNO @@ -438,7 +438,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ ENTRY (name); \ DO_CALL (SYS_ify (syscall_name)) -#if IS_IN(rtld) +#if !defined(USE_PPC_SCV) || IS_IN(rtld) # define PSEUDO_RET_ERRVAL \ blr #else @@ -446,7 +446,7 @@ LT_LABELSUFFIX(name,_name_end): ; \ # define PSEUDO_RET_ERRVAL \ NVOLREG_RESTORE; \ blr -#endif /* IS_IN(rtld) */ +#endif /* !defined(USE_PPC_SCV) || IS_IN(rtld) */ #define ret_ERRVAL PSEUDO_RET_ERRVAL -- cgit v1.1