summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTom Lane2022-08-13 17:36:39 +0000
committerTom Lane2022-08-13 17:36:39 +0000
commit8ded65682bee2a1c04392a88e0df0f4fc7552623 (patch)
treee6a32ff6612cc6d775b4444cc03abf1be8457f7e /configure.ac
parentadee0df127e088a47c58801fc5a412392297e1da (diff)
Remove configurability of PPC spinlock assembly code.
Assume that we can use LWARX hint flags and the LWSYNC instruction on any PPC machine. The check on the assembler's behavior was only needed for Apple's old assembler, which is no longer of interest now that we've de-supported all PPC-era versions of macOS (thanks to them not having clock_gettime()). Also, given an up-to-date assembler these instructions work even on Apple's old hardware. It seems quite unlikely that anyone would be interested in running current Postgres on PPC hardware that's so old as to not have these instructions. Hence, rip out associated configure test and manual configuration options, and just use the modernized instructions all the time. Also, update atomics/arch-ppc.h to use these instructions as well. (It was already using LWSYNC unconditionally in another place, providing further proof that nobody is using PG on hardware old enough to have a problem with that.) Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 1 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 010c8e6a25a..f5462ee7a03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1678,18 +1678,7 @@ case $host_cpu in
fi
;;
ppc*|powerpc*)
- # On PPC, check if assembler supports LWARX instruction's mutex hint bit
- AC_CACHE_CHECK([whether assembler supports lwarx hint bit],
- [pgac_cv_have_ppc_mutex_hint],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
- [int a = 0; int *p = &a; int r;
- __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));])],
- [pgac_cv_have_ppc_mutex_hint=yes],
- [pgac_cv_have_ppc_mutex_hint=no])])
- if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
- AC_DEFINE(HAVE_PPC_LWARX_MUTEX_HINT, 1, [Define to 1 if the assembler supports PPC's LWARX mutex hint bit.])
- fi
- # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
+ # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
AC_CACHE_CHECK([whether __builtin_constant_p(x) implies "i"(x) acceptance],
[pgac_cv_have_i_constraint__builtin_constant_p],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(