/* On powerpc64, use @notoc. */
#undef USE_PPC64_NOTOC
+/* On powerpc64, define if the compiler supports -mcpu=power10. */
+#undef USE_PPC64_MCPU_POWER10
+
/* Define if _Unwind_Find_FDE should be exported from glibc. */
#undef EXPORT_UNWIND_FIND_FDE
include $(o-iterator)
endif # do_f128_multiarch
+
+libm-sysdep_routines += e_log-ppc64
+
+ifeq ($(mcpu-power10), yes)
+libm-sysdep_routines += e_log-power10
+CFLAGS-e_log-power10.c += -mcpu=power10
+endif
+
endif
--- /dev/null
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
+
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -mcpu=power10"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler supports -mcpu=power10" >&5
+$as_echo_n "checking if the compiler supports -mcpu=power10... " >&6; }
+if ${libc_cv_mcpu_power10+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_cv_mcpu_power10=yes
+else
+ libc_cv_mcpu_power10=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mcpu_power10" >&5
+$as_echo "$libc_cv_mcpu_power10" >&6; }
+config_vars="$config_vars
+mcpu-power10 = $libc_cv_mcpu_power10"
+if test "$libc_cv_mcpu_power10" == "yes"; then :
+
+ $as_echo "#define USE_PPC64_MCPU_POWER10 1" >>confdefs.h
+
+fi
+CFLAGS="$OLD_CFLAGS"
--- /dev/null
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -mcpu=power10"
+AC_CACHE_CHECK([if the compiler supports -mcpu=power10],
+ libc_cv_mcpu_power10, [
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+]])],
+ [libc_cv_mcpu_power10=yes],
+ [libc_cv_mcpu_power10=no])])
+LIBC_CONFIG_VAR([mcpu-power10], [$libc_cv_mcpu_power10])
+AS_IF([[test "$libc_cv_mcpu_power10" == "yes"]],[
+ AC_DEFINE(USE_PPC64_MCPU_POWER10)])
+CFLAGS="$OLD_CFLAGS"
--- /dev/null
+#include <math.h>
+
+#define __log __log_power10
+#include <sysdeps/ieee754/dbl-64/e_log.c>
--- /dev/null
+#include <math.h>
+#define __log __log_ppc64
+
+#include <sysdeps/ieee754/dbl-64/e_log.c>
--- /dev/null
+/* Multiple versions of IEEE 754 log.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include "init-arch.h"
+#include <libm-alias-finite.h>
+
+extern double __redirect_ieee754_log (double);
+
+extern __typeof (log) __log_ppc64 attribute_hidden;
+#ifdef USE_PPC64_MCPU_POWER10
+extern __typeof (log) __log_power10 attribute_hidden;
+#endif
+
+libc_ifunc_redirected (__redirect_ieee754_log, __ieee754_log,
+#ifdef USE_PPC64_MCPU_POWER10
+ (hwcap2 & PPC_FEATURE2_ARCH_3_1)
+ ? __log_power10 :
+#endif
+ __log_ppc64);
+
+libm_alias_finite (__ieee754_log, __log)
--- /dev/null
+#include <sysdeps/../math/w_log.c>