1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00
Files
glibc/sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure.ac
Sam James cb7b1c9014 configure.ac: fix bashisms in configure.ac
configure scripts need to be runnable with a POSIX-compliant /bin/sh.

On many (but not all!) systems, /bin/sh is provided by Bash, so errors
like this aren't spotted. Notably Debian defaults to /bin/sh provided
by dash which doesn't tolerate such bashisms as '=='.

This retains compatibility with bash.

Fixes configure warnings/errors like:
```
checking if compiler warns about alias for function with incompatible types... yes
/var/tmp/portage/sys-libs/glibc-2.34-r10/work/glibc-2.34/configure: 4209: test: xyes: unexpected operator
```

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Sam James <sam@gentoo.org>
2022-03-22 21:53:43 -04:00

15 lines
491 B
Plaintext

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"