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 --- configure | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure') diff --git a/configure b/configure index a86bcf7671..9619c10991 100755 --- a/configure +++ b/configure @@ -791,6 +791,7 @@ enable_pt_chown enable_tunables enable_mathvec enable_cet +enable_scv with_cpu ' ac_precious_vars='build_alias @@ -1463,6 +1464,8 @@ Optional Features: depends on architecture] --enable-cet enable Intel Control-flow Enforcement Technology (CET), x86 only + --disable-scv syscalls will not use scv instruction, even if the + kernel supports it, powerpc only Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3814,6 +3817,19 @@ else fi +# Check whether --enable-scv was given. +if test "${enable_scv+set}" = set; then : + enableval=$enable_scv; use_scv=$enableval +else + use_scv=yes +fi + + +if test "$use_scv" != "no"; then : + $as_echo "#define USE_PPC_SCV 1" >>confdefs.h + +fi + # We keep the original values in `$config_*' and never modify them, so we # can write them unchanged into config.make. Everything else uses # $machine, $vendor, and $os, and changes them whenever convenient. -- cgit 1.4.1